A not so Random Random

Dwight Hughes dwighth at ipa.net
Fri Jun 11 23:06:03 UTC 1999


Jesse Welton wrote:
> Yes, experimenting with changing the generator to use integers, I
> found it to be much slower, and figured that must be why it was
> changed to use floats.  If I recall correctly, it was almost 50 times
> as slow, which puzzled me.  That it runs into LargePositiveIntegers
> helps explain that, but I'm still not sure why it should be so *much*
> slower.

Although you see primitives in the LargeInteger methods, they are only
placeholders -- they all map to primitiveFail in the VM. So LargeInteger
code actually runs entirely in Smalltalk.

-- Dwight





More information about the Squeak-dev mailing list