GNU bug report logs - #8794
cons_to_long fixes; making 64-bit EMACS_INT the default

Previous Next

Package: emacs;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Fri, 3 Jun 2011 08:45:02 UTC

Severity: wishlist

Tags: fixed, patch

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #61 received at 8794 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 8794 <at> debbugs.gnu.org, Emacs Development <Emacs-devel <at> gnu.org>
Subject: Re: bug#8794: (b) make the 64bit-on-32bit the default (if supported)
Date: Mon, 06 Jun 2011 10:54:24 -0700
[CC'ing to emacs-devel as this may be of more-general interest.
 This is about a plan to widen Emacs integers to 64 bits
 (62 bits after tagging) on typical 32-bit hosts.
 The original thread is in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8794>.]

On 06/06/11 07:52, Stefan Monnier wrote:
> let's keep it as an option for now and reconsider this choice for
> Emacs-24.2.  We should make a --with-wide-int option for ./configure, tho.

OK, thanks, I'll add that option.

> I want to make sure the drawbacks
>   are negligible.  How is the memory use impacted by your change in
>   "typical" sessions?  How is the CPU use impacted in typical sessions?
> Benchmarks running the byte-compiler, Gnus, and any other intensive
> Elisp code would be welcome.  Benchmarks testing the impact on
> redisplay performance wold also be welcome.
> I'd hope most of those benchmarks to show very little difference, but so
> far I haven't seen any reports to make confident that this is the case.

This all sounds reasonable.  I haven't noticed much difference in
ordinary interactive use, but I haven't done quantitative benchmarks.
Thanks for reviewing it and for taking the time to make these suggestions.

One thing I plan to do while benchmarking is to replace EMACS_INT
with ptrdiff_t whenever the value is known to fit in a 32-bit quantity
on a 32-bit host.  This won't make any difference unless --with-wide-int
is used, since EMACS_INT and ptrdiff_t are normally the same (on both
32-bit and 64-bit hosts).  But in the --with-wide-int case it should
decrease both memory footprint and register pressure and should be a
measurable win.

I've started an effort to do that, and (as usual) I'm finding more
int-overflow bugs as a side effect.  For example, on a 64-bit host,
(copy-sequence (make-bool-vector 17179869184 nil)) crashes Emacs,
due to integer overflow.  I plan to fix those bugs independently of
the EMACS_INT->ptrdiff_t change.




This bug report was last modified 9 years and 94 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.