emacs-devel
[Top][All Lists]
Advanced

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

Re: Overlays as an AA-tree


From: Stefan Monnier
Subject: Re: Overlays as an AA-tree
Date: Wed, 08 Feb 2017 08:04:06 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

> I have a question: The comment in lisp.h says not make Lisp_Misc bigger.

All Lisp_Misc use the same space.  This Lisp_Misc thingy was introduced
because the overhead of using a Lisp_Vectorlike was a bit higher than we
liked for those smallish objects (in terms of memory use as well as in
terms of CPU time needed for allocation/deallocation).

So, if you need an object to be larger, just take it out of Lisp_Misc
and use a Lisp_Vectorlike for it instead.

The implementation of Lisp_Vectorlike has been significantly improved in
the mean time, so the difference is not that large any more (but
Lisp_Misc should still be faster to allocate and suffers much less from
fragmentation).


        Stefan



reply via email to

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