From: Hervé Brönnimann (hervebronnimann_at_[hidden])
Date: 2007-03-11 13:43:03
I did this a while ago and was surprised that it wasn't faster than
std::sort, or even the plain old-fashioned quicksort. I am talking
about POD (int, double - which by the way are ordered numerically by
reinterpreting as char and applying radix sort with the
appropriate endianness), but also strings (with a generalization of
radix sort, either top-down or bottom-up).
It seemed to me that in order to really make such a library as a
replacement for std:sort for POD types whose comparison gives the
same result as the bit-wise comparison, there would need to be quite
some template meta-programming (using type_traits and worrying about
big/small endian) and the result wouldn't be guaranteed to be much
better. I'd love to be proved wrong...
All in all, although an interesting project, I think there is little
point to it since std::sort is already good enough and surprisingly
hard to beat.
On Mar 10, 2007, at 9:26 PM, Sam Schetterer wrote:
> Is anyone interested in a sorting library with optimized radixsorts,
> quicksorts, radix quicksorts, and mergesorts?
> Mortgage rates as low as 4.625% - Refinance $150,000 loan for $579
> a month.
> Unsubscribe & other changes: http://lists.boost.org/mailman/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk