From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.devel Subject: Re: Proposal: immediate strings Date: Mon, 28 May 2012 15:32:35 +0400 Message-ID: <4FC36253.1090904@yandex.ru> References: <4FBB51E7.6080601@yandex.ru> <4FBDD04F.9010203@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------000201030501040703050403" X-Trace: dough.gmane.org 1338204649 10849 80.91.229.3 (28 May 2012 11:30:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 28 May 2012 11:30:49 +0000 (UTC) Cc: Paul Eggert , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 28 13:30:48 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 1SYy9q-00031w-PI for ged-emacs-devel@m.gmane.org; Mon, 28 May 2012 13:30:43 +0200 Original-Received: from localhost ([::1]:45378 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SYy9q-0005Qe-As for ged-emacs-devel@m.gmane.org; Mon, 28 May 2012 07:30:42 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33336) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SYy9h-0005Q5-Nz for emacs-devel@gnu.org; Mon, 28 May 2012 07:30:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SYy9c-0006S2-6k for emacs-devel@gnu.org; Mon, 28 May 2012 07:30:33 -0400 Original-Received: from forward1.mail.yandex.net ([77.88.46.6]:33958) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SYy9b-0006Qs-K3 for emacs-devel@gnu.org; Mon, 28 May 2012 07:30:28 -0400 Original-Received: from smtp1.mail.yandex.net (smtp1.mail.yandex.net [77.88.46.101]) by forward1.mail.yandex.net (Yandex) with ESMTP id C973F124087E; Mon, 28 May 2012 15:30:20 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1338204620; bh=zuFaCSvczG9PzXfzvypTrYJ7jNnMl9WHH0Z3qJoOXQw=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type; b=j05Atg6Z1tSxQo+IArvbX5RKjPh+H1kMln45xRgupyGzgjHKflE0iOCSUFY2zvB0C no192UaJ0xs/BPgJBZs+KGglhX32G3+pC/kOCHBOTYD8haRHzSpKXUvEhqNvppl0fi OAMVMvep9840ONUeKv3NlVWFIgfSojsXc/yoQlTU= Original-Received: from smtp1.mail.yandex.net (localhost [127.0.0.1]) by smtp1.mail.yandex.net (Yandex) with ESMTP id 8A50CAA0306; Mon, 28 May 2012 15:30:20 +0400 (MSK) Original-Received: from antipov.client.gelicon.ru (antipov.client.gelicon.ru [78.153.153.8]) by smtp1.mail.yandex.net (nwsmtp/Yandex) with ESMTP id UJF4psTf-UJF4IkIR; Mon, 28 May 2012 15:30:20 +0400 X-Yandex-Rcpt-Suid: monnier@iro.umontreal.ca X-Yandex-Rcpt-Suid: eggert@cs.ucla.edu X-Yandex-Rcpt-Suid: emacs-devel@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1338204620; bh=zuFaCSvczG9PzXfzvypTrYJ7jNnMl9WHH0Z3qJoOXQw=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type; b=NJXci6lJ/93l5FqLqC2c2a405ByheUTzQvhpzz+26Hcp69h0np0D/+JX94o8LkpAK T3PglqYva+HkX31cKOHPjlxjuUdo4yrlTgJso1YEEeLNKLkCuveV/z+fVuaHv0lph6 0Mr+L27Rlu6en/0nXmXnu2DITkx655o8rnbyoRgM= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 77.88.46.6 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:150665 Archived-At: This is a multi-part message in MIME format. --------------000201030501040703050403 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 05/24/2012 11:14 AM, Stefan Monnier wrote: >> That might work. But this raises another idea: assuming most tiny strings >> don't have text properties, won't it improve performance overall if >> any string with text properties is forced to be an ordinary string, so >> that immediate strings can reuse the rarely-used 'intervals' member >> for data? > > That's part of the reason why I'm interested in his statistics about > which strings have text properties. YMMV since it depends on what happens. For a long byte-compile runs, ~0.05% - 0.1% of live strings may have text properties. On the other side, some editing operations may cause this percentage to grow; for example, (indent-region) in C mode buffers for a huge regions (a size of xdisp.c :-) gives ~15% of live strings with properties, and almost all of them are small (less than 16 bytes). BTW, is it possible to attach a properties to a string used to represent a symbol name? If not, we can drop some bits from mark_object at the cost of having some precautions in Fmake_symbol. Dmitry --------------000201030501040703050403 Content-Type: text/plain; charset=UTF-8; name="symbol_name_props.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="symbol_name_props.patch" PT09IG1vZGlmaWVkIGZpbGUgJ3NyYy9hbGxvYy5jJwotLS0gc3JjL2FsbG9jLmMJMjAxMi0w NS0yNSAxODoxOToyNCArMDAwMAorKysgc3JjL2FsbG9jLmMJMjAxMi0wNS0yOCAxMToxODo0 NSArMDAwMApAQCAtMzIxMSw2ICszMjExLDkgQEAKIAogICBNQUxMT0NfQkxPQ0tfSU5QVVQ7 CiAKKyAgaWYgKCFOVUxMX0lOVEVSVkFMX1AgKFNUUklOR19JTlRFUlZBTFMgKG5hbWUpKSkK KyAgICBuYW1lID0gYnVpbGRfc3RyaW5nIChTREFUQSAobmFtZSkpOworCiAgIGlmIChzeW1i b2xfZnJlZV9saXN0KQogICAgIHsKICAgICAgIFhTRVRTWU1CT0wgKHZhbCwgc3ltYm9sX2Zy ZWVfbGlzdCk7CkBAIC01NjkxLDcgKzU2OTQsOSBAQAogCSAgfQogCWlmICghUFVSRV9QT0lO VEVSX1AgKFhTVFJJTkcgKHB0ci0+eG5hbWUpKSkKIAkgIE1BUktfU1RSSU5HIChYU1RSSU5H IChwdHItPnhuYW1lKSk7Ci0JTUFSS19JTlRFUlZBTF9UUkVFIChTVFJJTkdfSU5URVJWQUxT IChwdHItPnhuYW1lKSk7CisKKwkvKiBTeW1ib2wgbmFtZSBzaG91bGQgaGF2ZSBubyBwcm9w ZXJ0aWVzLiAgKi8KKwllYXNzZXJ0IChOVUxMX0lOVEVSVkFMX1AgKFNUUklOR19JTlRFUlZB TFMgKHB0ci0+eG5hbWUpKSk7CiAKIAlwdHIgPSBwdHItPm5leHQ7CiAJaWYgKHB0cikKCg== --------------000201030501040703050403--