unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Dmitry Antipov <antipov@mvista.com>
Cc: emacs-devel@gnu.org
Subject: Re: immediate strings
Date: Sat, 26 Nov 2011 00:05:40 -0800	[thread overview]
Message-ID: <4ED09DD4.1090201@cs.ucla.edu> (raw)
In-Reply-To: <4ED04BBC.70803@yandex.ru>

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.



  parent reply	other threads:[~2011-11-26  8:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-26  2:15 immediate strings Dmitry Antipov
2011-11-26  7:56 ` Andreas Schwab
2011-11-26  8:05 ` Paul Eggert [this message]
2011-11-26 10:03   ` Eli Zaretskii
2011-11-26 14:28     ` Stefan Monnier
2011-11-26 14:30   ` Dmitry Antipov
2011-11-26 21:13     ` Paul Eggert
2011-11-28  4:19       ` --with-wide-int Stefan Monnier
2011-11-28  7:56         ` --with-wide-int Paul Eggert
2011-11-28 16:52           ` --with-wide-int Stefan Monnier
2011-11-28 18:04             ` --with-wide-int Dan Nicolaescu
2011-11-28 18:34               ` --with-wide-int Eli Zaretskii
2011-11-28 19:35               ` --with-wide-int Stefan Monnier
2011-11-29  4:26                 ` --with-wide-int Stephen J. Turnbull
2011-11-29  7:35             ` --with-wide-int Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ED09DD4.1090201@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=antipov@mvista.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).