From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master e828765: DEFVAR_INT variables are now intmax_t Date: Thu, 28 Feb 2019 20:09:36 +0200 Message-ID: <83bm2vkcnz.fsf@gnu.org> References: <83d0ndky55.fsf@gnu.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="40996"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 28 19:10:41 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gzQ8k-000AVn-B4 for ged-emacs-devel@m.gmane.org; Thu, 28 Feb 2019 19:10:38 +0100 Original-Received: from localhost ([127.0.0.1]:44391 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzQ8j-0005Sg-9h for ged-emacs-devel@m.gmane.org; Thu, 28 Feb 2019 13:10:37 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:44801) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzQ8B-0005Bc-Nf for emacs-devel@gnu.org; Thu, 28 Feb 2019 13:10:04 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:43993) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzQ8A-0006i7-Ae; Thu, 28 Feb 2019 13:10:02 -0500 Original-Received: from [176.228.60.248] (port=1498 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gzQ87-0004KI-Om; Thu, 28 Feb 2019 13:10:02 -0500 In-reply-to: (message from Paul Eggert on Wed, 27 Feb 2019 17:50:10 -0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:233706 Archived-At: > Cc: emacs-devel@gnu.org > From: Paul Eggert > Date: Wed, 27 Feb 2019 17:50:10 -0800 > > On 2/27/19 8:13 AM, Eli Zaretskii wrote: > > Doesn't this slow down 32-bit builds? We have quite a few of > > DEFVAR_INTs in Emacs. > > Emacs has 55 DEFVAR_INTs. This patch affects their width only on 32-bit > builds sans --with-wide-int. On my platform (Fedora 29 AMD Phenom II X4 > 910e compiled with gcc -m32 -march=native), narrowing DEFVAR_INTs back > from 64 to 32 bits (see attached patch) shrinks Emacs's bss space (as > computed by 'size') from 379144 to 378984 bytes, a savings of 0.04%. I > tried to measure how much it affects CPU performance but couldn't get > consistent results; it seems to be below the level of significance, > though if I tried harder I might be able to tease it out. Depends on what code you ran to test that, I presume. Looking at the list of DEFVAR_INTs, I see that about 40% of them are in the display engine, where speed certainly matters, although perhaps not in "emacs -Q". the ones in keyboard.c are also of some importance. So on balance, I guess I wonder why this minor aesthetic or maybe convenience issue is worth slowing down Emacs on those hosts. We have lived with this limitation for a long time, so why not leave it alone? Just because we _can_ make them bignums doesn't necessarily mean we should.