The other day I had to sort a rather large array. I could have used the wellknown quicksort-method, but then I remembered the combsort-method. (Unfortunately I can not remember, who has made this exellent sorting algorithm). Combsorting is very simple to implement and it is comparable in speed to quicksort, but is is not known by very many programmers.
Below is a VBscript-program where you can compare combsort to bobblesort. On my Thinkpad 570 I got the folowing results:
|Number of elements to sort:
||12.0 sec |
It is only the procedure CombSort, which is interesting. The rest is just to make it possible to measure the performance.