emacs-devel
[Top][All Lists]
Advanced

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

Re: immediate strings


From: Paul Eggert
Subject: Re: immediate strings
Date: Sat, 26 Nov 2011 00:05:40 -0800
User-agent: Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1

On 11/25/2011 06:15 PM, Dmitry Antipov wrote:
> I think it's worth playing with such a
> little complication.

This looks like a good thing to pursue.

Does the proposed implementation arbitrary restrict
string length to be 1/2 of their current limit?
I assume this could be fixed somehow, without too
much trouble.

Here's a further idea.  How about commandeering the
size and size_byte members as well, for immediate strings?
Both sizes could be stored in a single byte (on 32-bit
machines) or in two bytes (on 64-bit machines).

This would let us have as many as 11 bytes in an immediate
string on 32-bit hosts, and 22 bytes on 64-bit hosts (counting
the terminating null byte in both cases).

It might be worth commandeering the intervals member too,
to boost the size of immediate strings to 15 bytes on 32-bit
hosts and to 30 bytes on 64-bit hosts.  Strings with intervals
would have to be non-immediate, but that shouldn't hurt
performance much in practice.



reply via email to

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