[Vm-dev] Immediates

Jecel Assumpcao Jr jecel at merlintec.com
Thu May 7 23:13:22 UTC 2009

Bert Freudenberg wrote:

> Yes.  Keep 31-bit SmallIntegers, provide e.g. 24-bit immediate characters.
> Andreas wrote a thorough sketch of this scheme in 2006. 

I would like to see this scheme get adopted. My own suggestion for the
spare encoding (spare if the GC is changed, that is) was for unboxed 30
bit floats, but that seems to be unpopular and I guess I can live with
float arrays instead.

Certainly immediate charaters are very important as we move away from
ASCII, and I liked Andreas' suggestions of colors and short points as
well. But I would be particularly interested in having an immediate
encoding for symbols. You already have a global table from converting
to/from strings, so I see no need to store anything in the symbols
themselves. Having a trivial way to know that an object is a symbol
without chasing a class pointer could make serializing/restoring objects
a little faster.

-- Jecel

More information about the Vm-dev mailing list