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: [Emacs-diffs] trunk r117464: Shrink Lisp_Sub_Char_Table by preferring C integers to Lisp_Objects. Date: Thu, 03 Jul 2014 08:12:14 +0400 Message-ID: <53B4D81E.6010904@yandex.ru> References: <53B42194.2040003@yandex.ru> <53B42B2E.7090404@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1404360782 17464 80.91.229.3 (3 Jul 2014 04:13:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Jul 2014 04:13:02 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 03 06:12:56 2014 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 1X2YOD-0004bK-Dn for ged-emacs-devel@m.gmane.org; Thu, 03 Jul 2014 06:12:53 +0200 Original-Received: from localhost ([::1]:57612 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2YOC-0006AZ-JO for ged-emacs-devel@m.gmane.org; Thu, 03 Jul 2014 00:12:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35883) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2YO2-00069r-UP for emacs-devel@gnu.org; Thu, 03 Jul 2014 00:12:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X2YNv-0001Ek-Sw for emacs-devel@gnu.org; Thu, 03 Jul 2014 00:12:42 -0400 Original-Received: from forward5h.mail.yandex.net ([84.201.186.23]:37865) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2YNv-0001Ef-Ib for emacs-devel@gnu.org; Thu, 03 Jul 2014 00:12:35 -0400 Original-Received: from smtp1h.mail.yandex.net (smtp1h.mail.yandex.net [84.201.187.144]) by forward5h.mail.yandex.net (Yandex) with ESMTP id CC2E7D00E92; Thu, 3 Jul 2014 08:12:15 +0400 (MSK) Original-Received: from smtp1h.mail.yandex.net (localhost [127.0.0.1]) by smtp1h.mail.yandex.net (Yandex) with ESMTP id 668FF13405F9; Thu, 3 Jul 2014 08:12:15 +0400 (MSK) Original-Received: from unknown (unknown [37.139.80.10]) by smtp1h.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id H8RY8PLaIH-CEmeDNit; Thu, 3 Jul 2014 08:12:14 +0400 (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client certificate not present) X-Yandex-Uniq: a51ed588-a8ff-4fea-a96e-ff916d91e8f9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1404360734; bh=3FYQyVcabKklAjYaa5pYmFjV6Gquswxyo+5zQOLtNVA=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=CTPeV8khZsODT8PnnZB1K0oYBq60Ay4ncGf/3IuEfslcz4E/OS38fjlnIlKOSlWgT wgKIhd3B2diCXXRX1B0UEkP0sfWkmylhuqtYIetIWv6O4LiEX9snrCUS57vSb5QVSo rJ6BOd25KVHn/Xg0AqkZT/FkA/m7WWUSsLp2+A+g= Authentication-Results: smtp1h.mail.yandex.net; dkim=pass header.i=@yandex.ru User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 84.201.186.23 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:172857 Archived-At: On 07/02/2014 10:27 PM, Stefan Monnier wrote: > But the problem is that the code is vulnerable to these kinds > of changes. Why do we even need to treat such a Lisp_Sub_Char_Table as > a Lisp_Vector at all? I don't see any real need for it. This is somewhat similar to r110830 when we shrink struct vectorlike_header. Sub char-table is not a marginal and almost-not-used type (and the latter was a surprise to me) - for example, after C-h h I have more than 3K of live sub char-tables. On a 64-bit system, saving just 8 byte per sub char-table gives 24K. Not too much, but avoiding 2 Lisp_Objects also shaves off 6K calls to mark_object at GC (these calls was useless anyway just because depth and min_char are always integers and so don't need to be marked). Of course, an universal Eli-style "we don't need nano-improvements" argument makes all of the above just a nonsense. Dmitry