[Top][All Lists]

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

Re: utf8 and emacs text/string multibyte representation

From: Stefan Monnier
Subject: Re: utf8 and emacs text/string multibyte representation
Date: Wed, 29 Oct 2014 12:45:58 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

>> Yet setting string elements can trigger reallocations/memmove
>> operations.
> Emacs, as every editor, needs to handle this efficiently anyway,
> because editing operations rarely leave the buffer size unchanged.  So
> Emacs uses a gap to minimize reallocations.

To clarify: Emacs handles modification of strings naively
(reallocate+memmove), but it doesn't matter much because these are
almost never used (my own local Emacs actually completely disallows
them, and I very rarely bump into problems because of it).  All "string
modifications" instead take place in buffers where we can efficiently
insert/delete/replace text.


reply via email to

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