Phil Endecott | 6 Jul 18:17

Re: sorting floats by casting to integer

Steven Ross wrote:
> I think I've figured out what's going on with my 23-bit random data: floats
> on x86 have some form of optimization to look at the exponent first, and
> then the coefficient afterwards.  On x86 systems, the comparison is
> extremely slow if the exponents are the same.

I still find that implausible.

> With 23-bit random data, all the exponents are the same.

You aren't setting all the exponents to zero are you?  If you are then 
I think you're generating de-normal values.  The idea that comparing 
de-normals is slow is plausible; it's the sort of thing that might be 
done in microcode or in software on some systems.

(I've just noticed that Volodya has also suggested this explanation...)

Phil.

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


Gmane