emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Objects layout and tagging scheme


From: Stefan Monnier
Subject: Re: Objects layout and tagging scheme
Date: Fri, 03 Aug 2012 19:10:31 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

> That's why I'm thinking about per-object unified headers. Consider the
> following layout: if LSB (or MSB) of Lisp_Object is non-zero, the rest
> bits represents signed integer; otherwise, the rest bits represents the
> pointer to heap object. Each object has 4-byte header. In the header,

Yes, alternatives exist which have various advantages.
The advantages of the current system include:
- memory-efficient conses (and floats).
- cpu-efficient CONSP, SYMBOLP, STRINGP.

Also, many systems nowadays like to align their objects on multiples of
8 bytes, so increasing conses and strings by 32bits might end up
increasing their memory use by 8bytes unless we handle them specially.

Also, adding a separate "type+gc" word to vectors would only be
acceptable if we can get rid of the "next" field (which we could already
eliminate in the current code, BTW).

We could begin by trying to turn symbols into a kind of lisp_misc?


        Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]