Boost logo

Boost :

From: Steven Ross (spreadsort_at_[hidden])
Date: 2008-07-28 10:31:07


My current float_sort correctly sorts positive floats with a comparable
speedup to that for integer_sort. I'll deal with negative floats soon, but
one issue popped up in testing that I wasn't expecting:
nan's integer representation is a high positive number, yet with the float <
operator it is treated as a very small (smallest?) number. Unless I
special-case nan, the results of std::sort and float_sort will differ.
Do I need to special-case nan?
Also, there will only be a functor version of float_sort; I don't want to
confuse the normal float >> (whatever that does) with the operation
Spreadsort requires, and in my testing a good functor doesn't make a
noticeable performance difference versus a member function.
Given these issues, and the fact that the speedup is no greater than for
integer_sort, is a float_sort still of interest?

Steve


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk