Better integer performance possible?
Michael Klein
Mklein at nts.net
Mon Oct 25 20:15:12 UTC 1999
> Ask Ian about Jitter -- he has been having fun with it recently. When he's
done, I think the SmallInt comparison will be much better. LargeInts
will be similarly better, but not like the Dolphin numbers. I
personally have not ever found LargeInt speed to be a concern in any
useful code.
It is very usefull in cryptography. See:
Applied Cryptography
Protocols, Algorithms, and Source Code in C
by Bruce Schneier
ISBN: 0-471-59756-2
especially Section 9.5
I found out about Squeak's LargeInteger slowness while trying to port
some crypto-stuff to Squeak.
Incidentally, when I'm trying to hype Smalltalk to some C hacker, I tell
them about my experience
of porting the RSA reference code for large prime number generation from
C to Smalltalk.
It consisted mostly of deleteing the C-Code, and slight syntactical
changes to the
*comment* in the C-code into Smalltalk. Java is almost as ugly as C in
this case, as well.
> We would happily invite a replacement LargeInt package into Squeak if it
were at least as simple and understandable (I cannot imagine this not
being the case!!), and if it did not add a significant overhead to the
VM.
Perhaps they could be pluggable. SmallIntegers aren't easily
understandable... all of the complexity
is hidden into C into machine-language into silicon. There is absolutly
no insight on how to
divide small integers anywhere (that I know of) in Squeak.
-- Mike Klein
More information about the Squeak-dev
mailing list
|