From: Sam Schetterer (samthecppman_at_[hidden])
Date: 2007-03-16 18:01:53
On March 16, Lewis Hyatt wrote
I took a look at it. Some of my thoughts:
-You should provide random access iterator interfaces, not just a bare
-Your docs say you require T to be an integral type or have operator<
think you meant to say "built-in arithmetic type" or something similar.
should also let the user provide their own comparison functor instead of
requiring them to overload operator<
-Based on your descriptions, it looks like merge_sort is the same as
std::stable_sort and quicksort is the same as std::sort, more or less.
the standard functions have more generic interfaces). What advantage are
supposed to have over the standard functions? I tried some timings, and
that for both ints and doubles, on my system, your quicksort is about
than std::sort, and your mergesort is about 5% faster than
least for the case of already-sorted data.
-It might make more sense to focus on radix sort, since that is not
offered in the standard library...
Are you sure about the quicksort speed difference? That seems like a huge
difference. Did you have inlining enabled? Also, the current versions are
not the final forms. I am implementing random-access iterators and
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk