[Top][All Lists]

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

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

From: Stefan Monnier
Subject: Re: `aset` on strings, changing the size in bytes
Date: Sat, 08 Sep 2018 18:09:41 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> 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.


reply via email to

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