[squeak-dev] Integer bits
ncellier at ifrance.com
Tue Jul 8 01:39:14 UTC 2008
To speed a little bit SmallInteger highBit and lowBit,
This is not a premature optimization.
These low level messages are important for a number of packages.
- LargeInteger arithmetic / printing (mantis #6887)
- Float asTrueFraction (mantis #3373)
- Fraction asFloat (mantis #3568)
- SqNumberParser (mantis #3512 #6976 #6982)
We can optimize further.
The precomputed array could be easily extended to 256 elements if needed.
Concerning space, a ByteArray would also be sufficient, but would
require a Class variable.
This helped me finding http://bugs.squeak.org/view.php?id=7114
Analysis of senders seems to indicate this flaw did not strike yet.
A long time since i did not find a bug. Is kernel stabilizing?
Last, for manipulating bits, i found that a bitAt: was lacking.
More information about the Squeak-dev