Questions about FloatArrays

Andreas Raab raab at isgnw.cs.Uni-Magdeburg.DE
Fri Jun 12 14:32:38 UTC 1998


> I would propose to go further than that and change the format of Floats
> as well, to make all float-containing objects be usable from the
> platform without special macros.

I agree. There are only a few locations where the order of Floats is
important and those could be changed to use selectors like #highWord and
#lowWord instead of #basicAt:

> However, this opens another, more difficult, question:
> Since doubles on some platforms have to be 8-byte aligned, objects (at
> least those potentially containing doubles) should probably be aligned
> on 8-byte minus 4.

The alternative would be using single precision floats in the FloatArrays.
Actually, I was investigating this since the storage overhead of double
precision floats outweighs the improved precision in a number of
applications (say in 3D graphics where you have literally millions of

Linear algebra is your friend - Trigonometry is your enemy.
+===== Andreas Raab ============= (raab at =====+
I Department of Simulation and Graphics      Phone: +49 391 671 8065  I
I University of Magdeburg, Germany           Fax:   +49 391 671 1164  I
+=============< >=============+

More information about the Squeak-dev mailing list