Removing the fear of using long integers

Dan Ingalls DanI at wdi.disney.com
Mon Feb 2 16:01:37 UTC 1998


"David N. Smith" <dnsmith at watson.ibm.com> wrote...

>IBM Smalltalk (and at least some other commercial Smalltalks) use 32 bit
>integers and do the work in a primitive. There exist C packages which
>implement long integer operations and which are portable, so such support
>should not limit the portability of Squeak.
>
>I suggest that Squeak be changed to use 32 bit integer components in long
>integers; the factor of 40+ is typical and matches what I've measured on
>other hardware platforms and other Smalltalk systems in the past.

Dave -

I agree with your desire, but I'd like you to consider another approach.

The largeInt code is exactly the kind of code that can be compiled into Squeak primitives, with some attention to detail.  We typically see 20-40x improvement when we do this.  Along the way, a couple of the algorithms could use some cleanup and tuning as well (like, multiply could certainly go faster than NxM bytes).  Wouldn't you like to be able to see the code in Squeak, be able to test it by commenting out the <primitive>, and be able still to run everything in a tiny VM that didn't implement the primitives?  I wouldn't suggest this alternative if I didn't think it could go just as fast too.

In technology, ALWAYS ask to have your cake and eat it too.

	- Dan





More information about the Squeak-dev mailing list