VI4 (was: RE: [ANN]Draft rough plan for 3.6!)
bryce at kampjes.demon.co.uk
Tue Apr 15 17:52:12 UTC 2003
Tim Rowledge writes:
> Bryce Kampjes <bryce at kampjes.demon.co.uk> wrote:
> > There are a few things that would be nice purely for performance in an
> > image change. Having a tag bit of 0 rather than 1 for integers would
> > shave 3 instructions off simple arithmetic taking it down to 5
> > instructions on an x86.
> .. and it would involve having the tag bit added to every OOP, meaning
> that one would have to mask out that bit for any indirection through
> that OOP.
But the OOP mask can be done for free by using addressing modes. Even
RISCs include loads and stores with a small constant offset. Just add
the tag to the constant offset. Chances are that an offset is already
used to point to the instance variable being fetched.
A Self paper on the VM data structure formats has a nice design for
this. Probably the cleanest VM tagging design I've read about, in the
paper they were claiming it was fast because it removed checks from
the garbage collector's inner loops. Sorry, I don't have the
reference, I'm relying on memory.
More information about the Squeak-dev