From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Making --with-wide-int the default Date: Fri, 16 Oct 2015 10:18:26 +0200 Message-ID: <8737xbusz1.fsf@fencepost.gnu.org> References: <83r3trulse.fsf@gnu.org> <54E0D7E0.305@87.69.4.28> <83h9unukbg.fsf@gnu.org> <54E0DEF8.7020901@dancol> <83egpruiyp.fsf@gnu.org> <54E0FF93.2000104@dancol.org> <5610ED13.1010406@dancol.org> <56117F37.9060808@dancol.org> <83oag087gs.fsf@gnu.org> <83oafz70im.fsf@gnu.org> <5620AF43.4050401@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1444983535 2584 80.91.229.3 (16 Oct 2015 08:18:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 16 Oct 2015 08:18:55 +0000 (UTC) Cc: Juanma Barranquero , Eli Zaretskii , emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 16 10:18:54 2015 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 1Zn0Dx-0003vR-S4 for ged-emacs-devel@m.gmane.org; Fri, 16 Oct 2015 10:18:50 +0200 Original-Received: from localhost ([::1]:51574 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zn0Dx-0007AR-9Y for ged-emacs-devel@m.gmane.org; Fri, 16 Oct 2015 04:18:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38100) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zn0Df-0007AL-4I for emacs-devel@gnu.org; Fri, 16 Oct 2015 04:18:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zn0De-0002rz-5Z for emacs-devel@gnu.org; Fri, 16 Oct 2015 04:18:31 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38749) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zn0Db-0002pj-DV; Fri, 16 Oct 2015 04:18:27 -0400 Original-Received: from localhost ([127.0.0.1]:52568 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.82) (envelope-from ) id 1Zn0Da-0001iX-HO; Fri, 16 Oct 2015 04:18:26 -0400 Original-Received: by lola (Postfix, from userid 1000) id 093C1DF4F5; Fri, 16 Oct 2015 10:18:26 +0200 (CEST) In-Reply-To: <5620AF43.4050401@cs.ucla.edu> (Paul Eggert's message of "Fri, 16 Oct 2015 01:03:15 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e 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:191720 Archived-At: Paul Eggert writes: > Eli Zaretskii wrote: >> To make it the default for all 32-bit builds, we should make sure it >> works well on the other supported platforms. Perhaps Paul could tell >> which platforms he found this to work on, and then we could decide. > > --with-wide-int is not the default because Stefan was worried about > its performance implications on older, slower 32-bit machines (such as > Stefan's and/or RMS's laptops at the time, if I recall > correctly). There shouldn't be any correctness problem with it; it's a > performance issue. > > I typically use 64-bit platforms nowadays, where the issue is > moot. When I do use 32-bit platforms, I normally configure > --with-wide-int. There is roughly a 30% CPU hit and maybe a 60% hit on > virtual memory, but it's worth it to me (I normally don't notice the > difference). Ugh. That would be quite noticeable to me. While I build my own Emacs, having to drag around a bundle of homebrewn options just to get sensible behavior does not appeal to me. Instead of going to 64-bit unilaterally it would seem to make more sense to me to degrade gracefully into gmp. GUILE does that, I think that XEmacs or SXEmacs can do it, and it's usual for Lisp implementations. That leaves the memory cost for the 0.01% of uses (if at all) that need it. Of course, with a CPU cost hit (which in the common case of addition/subtraction at natural width would amount to checking the overflow bit afterwards). Would also make for a nice speedup of calc (which implements everything the hard way via small ints and lists, the Emacs 18 way: David Gillespie dropped off the Earth before I could manage to have him dig up his Emacs 19 modifications using floating point when available). If one can disentangle the internals appropriately. But that's probably easier for using gmp transparently than for using FP as first approximation. -- David Kastrup