Just to throw something new (for VB6) into the ring of competing Sort-Algos...
I've just finished porting (from Java-SourceCode) the relative new (Sep. 2009) Dual-Pivot-Algorithm, invented by
Vladimir Yaroslavskiy, who has tuned good old QuickSort significantly, leaving over next to zero disadvantages.
Here his posting, which finally led to the inclusion of this new algorithm into the official Java-SDK (used in Java.Array)
http://permalink.gmane.org/gmane.com...ibs.devel/2628
The source for this new Algo is contained in the attached Demo-Zip.
Here's a Screenshot, which shows its performance with different kinds of Input-Data:
With normal (random) Data it shows no disadvantages to a Standard-QuickSort -
but offers huge improvements over "naive Quicksorts" when fed with "inconvenient data".
As a side-note:
HeapSort is outperformed in all tests quite significantly by the DualPivot-Algo...
HeapSort is also beaten by the naive QuickSort in all tests, except the one with constant Data.
![]()
Olaf
I've just finished porting (from Java-SourceCode) the relative new (Sep. 2009) Dual-Pivot-Algorithm, invented by
Vladimir Yaroslavskiy, who has tuned good old QuickSort significantly, leaving over next to zero disadvantages.
Here his posting, which finally led to the inclusion of this new algorithm into the official Java-SDK (used in Java.Array)
http://permalink.gmane.org/gmane.com...ibs.devel/2628
The source for this new Algo is contained in the attached Demo-Zip.
Here's a Screenshot, which shows its performance with different kinds of Input-Data:
With normal (random) Data it shows no disadvantages to a Standard-QuickSort -
but offers huge improvements over "naive Quicksorts" when fed with "inconvenient data".
As a side-note:
HeapSort is outperformed in all tests quite significantly by the DualPivot-Algo...
HeapSort is also beaten by the naive QuickSort in all tests, except the one with constant Data.

Olaf