http://gwt-code-reviews.appspot.com/1277801/diff/5001/6001
File plugins/npapi/NPVariantWrapper.h (right):

http://gwt-code-reviews.appspot.com/1277801/diff/5001/6001#newcode105
plugins/npapi/NPVariantWrapper.h:105: if (isInt(variant)) {
Yes, I would never expect modf to be faster than the cast, as the
double->int conversion is a single instruction on most architectures.
Plus, modf doesn't actually tell you what you want -- you want to know
if the value in the double is an integer that fits in 32 bits, while
modf will tell you 2^40 is an integer.

There is probably a cute (ie, hacky) way to examine the bits of the IEEE
double and see if it is integral, but using the cast is certainly fine
for now.

http://gwt-code-reviews.appspot.com/1277801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to