Subject: Re: [boost] Review Request: Algorithm.Sorting
From: Steven Ross (spreadsort_at_[hidden])
Date: 2009-05-06 22:43:17
Does this ease your mind? float_sort shouldn't compile if the float type
isn't correct, and this is the code I've been using for casting floats to
BOOST_STATIC_ASSERT(sizeof(Cast_type) == sizeof(Data_type));
std::memcpy(&result, &(*floatiter), sizeof(Data_type));
Also, the mostly-sorted performance issue is resolved; performance is now
comparable on Windows between integer_sort and std::sort on mostly-sorted
data, without any platform-specific edits.
That should resolve all outstanding concerns I am aware of.
On Wed, May 6, 2009 at 1:26 PM, Ross Levine <ross.levine_at_[hidden]> wrote:
> On Mon, Apr 27, 2009 at 10:32 AM, Steven Ross <spreadsort_at_[hidden]>
> > float_sort, which sorts IEEE floating-point numbers as integers
> This worries me a little. C++ floating-point format is
> implementation-defined, and is not necessarily in IEEE 754.
> Unsubscribe & other changes: