emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] master e828765: DEFVAR_INT variables are now intmax_t


From: Paul Eggert
Subject: Re: [Emacs-diffs] master e828765: DEFVAR_INT variables are now intmax_t
Date: Wed, 27 Feb 2019 17:50:10 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1

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.

My impression is that it's worth the small extra cost to get correct
answers rather than junk, for the affected variables. If performance
issues are of significant concern, I could split the DEFVAR_INTs into
two categories: one where even 32-bit fixnums will easily serve (e.g.,
column counts), and one where 64-bit counters are needed (e.g.,
garbage-collection byte counts). This would complicate the internals a
bit, though.

Attachment: narrow-DEFVAR_INT.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]