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: Proposal: immediate strings Date: Tue, 29 May 2012 00:38:09 -0700 Organization: UCLA Computer Science Department Message-ID: <4FC47CE1.6050901@cs.ucla.edu> References: <4FBB51E7.6080601@yandex.ru> <4FC472E6.5020005@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1338277105 17052 80.91.229.3 (29 May 2012 07:38:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 29 May 2012 07:38:25 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 29 09:38:23 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SZH0X-0007zt-Fk for ged-emacs-devel@m.gmane.org; Tue, 29 May 2012 09:38:21 +0200 Original-Received: from localhost ([::1]:35393 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SZH0X-0000lc-6R for ged-emacs-devel@m.gmane.org; Tue, 29 May 2012 03:38:21 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SZH0U-0000l1-8q for emacs-devel@gnu.org; Tue, 29 May 2012 03:38:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SZH0O-0006fT-4a for emacs-devel@gnu.org; Tue, 29 May 2012 03:38:17 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:44454) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SZH0N-0006f1-VK for emacs-devel@gnu.org; Tue, 29 May 2012 03:38:12 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id D80EC39E8010; Tue, 29 May 2012 00:38:08 -0700 (PDT) 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 WASIKfmTlL8L; Tue, 29 May 2012 00:38:08 -0700 (PDT) Original-Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 045EB39E800E; Tue, 29 May 2012 00:38:08 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 In-Reply-To: <4FC472E6.5020005@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:150675 Archived-At: On 05/28/2012 11:55 PM, Dmitry Antipov wrote: > To avoid using 'packed' attribute and speedup an inefficient access to u.dat.size > field, it's possible to use 'ptrdiff_t X : BITS_PER_PTRDIFF_T - 2' > bitfields - it's still wide enough to hold the values up to STRING_BYTES_BOUND. That's not true on 32-bit hosts configured --with-wide-int. On such hosts, a string can contain up to PTRDIFF_MAX - 1 bytes. This proposal would lower the limit to PTRDIFF_MAX / 4 bytes. In contrast, the proposal in would merely lower it to PTRDIFF_MAX - 65536 bytes.