strange real timings partly explained
Henry Cejtin
henry@sourcelight.com
Wed, 20 Jun 2001 11:59:10 -0500
I'm a bit nervous about just aligning all objects mod 8. For one thing, you
would have to re-arrange objects so that the doubles all come together if
there are lots of doubles and other things, so that you only need at most 1
pad. I.e., you would want to store
int * double * int * double
as
int * int * double * double
For another, it can cost you a bit of space. The worst case is probably
something like a list of Real64.real objects, where the average of 4 bytes
wasted is going to be noticable.
Next is the GC slow down.
At any rate, the first thing to do, which should be trivial, is to just make
sure that non-stack non-heap double variables are stored aligned.