GNU bug report logs -
#32405
[PATCH] Turn misc objects into pseudovectors
Previous Next
Reported by: Paul Eggert <eggert <at> cs.ucla.edu>
Date: Thu, 9 Aug 2018 03:00:02 UTC
Severity: wishlist
Tags: patch
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>> 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.
Cool!
> 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,
Stefan
This bug report was last modified 6 years and 340 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.