GNU bug report logs - #32405
[PATCH] Turn misc objects into pseudovectors

Previous Next

Package: emacs;

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 32405 <at> debbugs.gnu.org
Subject: bug#32405: Turning misc objects into pseudovectors
Date: Wed, 8 Aug 2018 22:01:09 -0700
> 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).




This bug report was last modified 6 years and 341 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.