[Mono-list] Making a ruby.net compiler

Jaroslaw Kowalski jaroslaw.kowalski@atm.com.pl
Mon, 12 May 2003 09:44:42 +0200

> > 2. If you want to align your pointers before each dereference - you can
> > it but you have to add some additional instructions to the JIT output,
> > would reduce the benefit of using bit flags
> Yes, there will be some overhead, but it is still worth it.
> The overheads are very small, and you can reduce data space usage
> dramatically using this technique, which can also improve speed
> due to better locality.

I'm not a CPU expert, but when Pentium 1 ruled the Earth this kind of
operation introduced quite a long stall (AGI - Address Generation Interlock,
as far as I remember), because it took some time before the result of
address generation (AND in this case) could be used to dereference or jump.
So you had to do some advanced pipelining to do something while in the
stall. The stall didn't occur when you dereferenced an unmodified pointer
(freshly fetched from some memory location).

Not sure if this is valid now that we have Pentium 4 and Athlon XP.