In between SmallIntegers and LargeIntegers...FloatIntegers?
Jesse Welton
jwelton at pacific.mps.ohio-state.edu
Thu Apr 18 17:38:52 UTC 2002
Bijan Parsia wrote:
>
> Summary: "An even simpler possibility is to use floating point operations
> for semi-long integers."
>
> It made me wonder want the impact of a scheme like that would be on
> Squeak. I.e., would some loops benefit? How about all over memory
> consumption? etc.
Unless this has changed recently, Squeak already uses floats for the
integer arithmetic in its pseudorandom number generation. When I
played with this a couple of years ago, it was definitely much faster
than using ints which overflowed into long ints. Surprizingly, it was
even faster than ints constrained to a short int range by arbitrarily
reducing the modulus of the arithmetic. I never fully understood why.
-Jesse
More information about the Squeak-dev
mailing list
|