6 Jul 18:17
Re: sorting floats by casting to integer
Phil Endecott <spam_from_boost_dev <at> chezphil.org>
2009-07-06 16:17:59 GMT
2009-07-06 16:17:59 GMT
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
RSS Feed