[Top][All Lists]

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

bug#32405: Turning misc objects into pseudovectors

From: Stefan Monnier
Subject: bug#32405: Turning misc objects into pseudovectors
Date: Thu, 09 Aug 2018 12:24:48 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> AFAIK the main issue with pseudovectors is that their allocation is
>> slower and suffers more from fragmentation (because we don't use
>> a size-segregated allocation algorithm (like Linux's SLAB, for example)
>> for them).
> Pseudovectors do have size-segregated allocation; see the vector_free_lists
> array. Although it's not as fancy as Linux's SLAB, I hope it's enough for
> Emacs; if not we could of course make it fancier.

Ah, I had forgotten about vector_free_lists.  So I guess it will likely
suffer a bit more from fragmentation, but performance should be
good enough, thanks.

>> Are you sure the new code is faster overall?
> That's what I measured with 'make compile-always', yes.


> Of course this is just one benchmark.  (My original intuition was that
> nobody would notice the difference....)

I think you're right.

>> There is also a potential issue in terms of the resulting heap size of
>> markers (which may bump up from 6 words to 8 words, IIRC, unless your
>> patch does something to keep it down to 6)
> On a 64-bit platform the heap size of markers does not grow.  The old size is
> 6 words (sizeof (union aligned_Lisp_Misc) is 48), and the new size is also
> 6 words (sizeof (struct Lisp_Marker) is also 48).

Perfect, thanks,


reply via email to

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