|
From: | Paul Eggert |
Subject: | bug#32405: Turning misc objects into pseudovectors |
Date: | Wed, 8 Aug 2018 22:01:09 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
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.
To some extent the point of this change is that we don't need a separate Lisp_Object tag in order to have size-segregated allocation, since pseudovectors already do that.
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....)
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).
[Prev in Thread] | Current Thread | [Next in Thread] |