emacs-devel
[Top][All Lists]
Advanced

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

Re: `aset` on strings, changing the size in bytes


From: Eli Zaretskii
Subject: Re: `aset` on strings, changing the size in bytes
Date: Sun, 09 Sep 2018 08:22:06 +0300

> From: Stefan Monnier <address@hidden>
> Date: Sat, 08 Sep 2018 18:09:41 -0400
> 
> >> The need for an indirection (a String_Object has to hold a pointer to an
> >> sdata object rather than being able to keep its payload directly in the
> >> Lisp_String object (using FLEXIBLE_ARRAY_MEMBER))
> > Why is that a problem?
> 
> It slows down every string access, and increases the heap size of every
> string (currently they're something like N bytes of payload plus
> 5 words where 2 of those 5 words are due to the extra indirection).
> 
> For a feature that's almost never used, I think it's pretty costly.

It can be (and was) used by memory-allocation infrastructure,
especially with very large strings.  Are we sure we want to lose it
for slowdown that should be hardly perceptible?



reply via email to

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