[Top][All Lists]

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

Re: t and nil in pure memory?

From: Richard Stallman
Subject: Re: t and nil in pure memory?
Date: Sat, 14 Nov 2009 06:23:09 -0500

    You can remove the `next' pointer to make symbols smaller (tho on 32bit

Do you mean 64-bit machines?

             it would only make them smaller if you additionally remove
    another field (like plist), because of the alignment constraint).

That's because of 5 bits.  If we could get rid of them, or move them somewhere,
we could reduce the size by 64 bits.

One way to avoid the next pointer is by storing all the symbol
pointers directly in the obarray, and making the obarray larger when
it gets close to full.  That's not traditional for Lisp obarrays but
it might be ok.  That would replace N words in symbols with maybe
n*1.3 words in the obarray.

Then all that is needed is to move those 5 bits somewhere, perhaps
packing them into the pointers in a symbol in some kludgy way.

Anyway, it is easy to store the plists for t and nil in
a couple of C variables, without changing the format of symbols.
This requires a little special code in the plist access functions,
but maybe the time that costs will be less than what is saved in GC.

As for their next pointers, if they are the first symbols to be
interned, they are at the end of their obarray buckets, so their
next pointers never need to be changed.  (We should make `unintern'
check for t and nil and give an error.)

reply via email to

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