>>>>> "Eric" == Eric Blake <[EMAIL PROTECTED]> writes:
Eric> My version was more or less from Integer.toUnsignedString,
Eric> except that I calculated the mask once instead of in the loop
Eric> (which means the version in Integer can be optimized, too).
This is done in the libgcj version.
Eric> Also, (int)l & mask is more efficient than (int)(l & mask), as
Eric> the VM then does not have to expand mask to a long, perform 64
Eric> bit math, and chop it back down.
Thanks.
Eric> I also noticed that the compareTo methods in both Long and
Eric> Integer have a bug - subtraction only produces a valid result if
Eric> the answer doesn't overflow.
See the libgcj version.
Tom
_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath