From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: immediate strings Date: Sat, 26 Nov 2011 00:05:40 -0800 Message-ID: <4ED09DD4.1090201@cs.ucla.edu> References: <4ED04BBC.70803@yandex.ru> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1322294757 8878 80.91.229.12 (26 Nov 2011 08:05:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 26 Nov 2011 08:05:57 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 26 09:05:53 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RUDGj-0005Vg-0d for ged-emacs-devel@m.gmane.org; Sat, 26 Nov 2011 09:05:53 +0100 Original-Received: from localhost ([::1]:39760 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RUDGi-0004nv-BL for ged-emacs-devel@m.gmane.org; Sat, 26 Nov 2011 03:05:52 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:48648) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RUDGg-0004nq-5p for emacs-devel@gnu.org; Sat, 26 Nov 2011 03:05:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RUDGf-00050S-6w for emacs-devel@gnu.org; Sat, 26 Nov 2011 03:05:50 -0500 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:41361) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RUDGf-00050I-1e for emacs-devel@gnu.org; Sat, 26 Nov 2011 03:05:49 -0500 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id C9D1CA60007; Sat, 26 Nov 2011 00:05:45 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HjAiUVGDRyBU; Sat, 26 Nov 2011 00:05:45 -0800 (PST) Original-Received: from [192.168.1.16] (pool-71-109-158-111.lsanca.dsl-w.verizon.net [71.109.158.111]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 54071A60001; Sat, 26 Nov 2011 00:05:45 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 In-Reply-To: <4ED04BBC.70803@yandex.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 131.179.128.62 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:146248 Archived-At: 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.