The idea of quicksort is extremely simple. But the direct
implementations of it are toy sorts, not suitable for real use. It's
quite tricky to do a real implementation, and apparently minor
changes can kill performance. Once you get it working, then of
course there isn't so much to maintain, so perhaps it's more accurate
to say that it's hard to get working. You can see the difference in
my SortLibrary code; compare the insertion sort code to the quicksort
code.
Charles Yeomans
On Aug 3, 2006, at 12:05 AM, Walter Purvis wrote:
Charles,
I agree with your overall point, but I'm curious about the quicksort
comment. Seeing as how the entire quicksort algorithm fits easily on a
single page, how much "vastly harder" can its maintainability be? Just
curious what you meant...
-----Original Message-----
Not really. Loop unrolling is a standard example of a speed
optimization that increases code size and reduces
maintainability and reliability in exchange for execution
speed (sometimes). Quicksort trades a more complex
algorithm, vastly harder maintainability, and more code for
significantly improved execution.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>