DN> At long last we have reached the version of Quicksort that uses the most
DN> up-to-date version of the algorithm. This incorporates an Insertion sort
DN> for
DN> short subfiles, Singleton's median-of-three pivot selection and now
DN> Sedgewick's removal of recursion.
btw, i've seen a compiler (the same one) that can remove _tail_
recursion and replace it with a loop. I've never seen, though, a
compiler that will build an explicit stack for you. :-)
i'd like to see a compiler that will replace a bubblesort by a
quicksort... and annotate it in the source code... :-)
matju
--- Terminate 4.00/Pro
---------------
* Origin: The Lost Remains Of SatelliteSoft BBS (1:163/215.42)
|