FloatArray : puzzled about varying speed

Andreas Raab andreas.raab at gmx.de
Wed Feb 14 09:58:17 UTC 2007


Herbert König wrote:
> The only thing I can think of is that the Arrays of 150 inputs are
> mainly populated with zeroes and 1 to 10 non zero values. So a lot of
> the coefficients end up as  '7.00649232162409e-45'.
> 
> Wikipedia says the closest to zero number in 32 Bit float is some
> 1e-38 so maybe the above numbers get a special (and time consuming)
> treatment in the primitives?

It is possible (though require specific testing) that the resulting 
floating point values cause underflow or similar fp exceptions and may 
be handled specially. Only a well-defined benchmark could tell. But just 
out of curiosity, what processor are you running?

Cheers,
   - Andreas



More information about the Squeak-dev mailing list