Subject: Re: why are tags and data packed together?
From: (Rob Warnock)
Date: 1999/11/16
Newsgroups: comp.lang.lisp
Message-ID: <80qlgv$>
Harley Davis <> wrote:
| <> wrote"
| > Why do modern lisp compiler implementations tend to pack data and tag
| > into a single 32 bit value?
| John Rose's Scheme implementation "esh" actually did this by passing an
| extra type arg with all arguments passed around and stored.

"Elk", as distributed[*],  does this, too.

David, you've gotten lots of good answers, but if you *really* want a
heavy dose of this stuff, be sure to read:

  Gudeman. "Representing Type Information in Dynamically Typed Languages"

It goes into a large number of variations on how to "wrap" native machine
values into dynamically-typed values and vice-versa, including low-level
efficiency tradeoffs between them. E.g., Gudeman refers to the "esh"/"Elk"
method as "double wrappers", whereas SCM, for example, uses "multi-stage


[*] Just for fun (and as a basis for another project), I hacked up Elk-3.0
to *not* use double wrappers, but a more classic tagged-pointer scheme.
Didn't seem to affect runtime much, though it *definitely* lowered memory
consumption. Changes to garbage collection seemed to have much more impact...

Rob Warnock, 8L-846
Applied Networking
Silicon Graphics, Inc.		Phone: 650-933-1673
1600 Amphitheatre Pkwy.		FAX: 650-933-0511
Mountain View, CA  94043	PP-ASEL-IA