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 11:00:52 +0200 Message-ID: <87twprtcfv.fsf@fencepost.gnu.org> References: <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> <8737xbusz1.fsf@fencepost.gnu.org> <5620BA34.1040600@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1444987598 2544 80.91.229.3 (16 Oct 2015 09:26:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 16 Oct 2015 09:26:38 +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 11:26:37 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 1Zn1HL-0003w0-RN for ged-emacs-devel@m.gmane.org; Fri, 16 Oct 2015 11:26:24 +0200 Original-Received: from localhost ([::1]:52097 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zn1HL-00063Q-1O for ged-emacs-devel@m.gmane.org; Fri, 16 Oct 2015 05:26:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54528) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zn0sq-0004CM-UR for emacs-devel@gnu.org; Fri, 16 Oct 2015 05:01:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zn0sn-00045M-2X for emacs-devel@gnu.org; Fri, 16 Oct 2015 05:01:04 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39931) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zn0sg-00042Q-DQ; Fri, 16 Oct 2015 05:00:54 -0400 Original-Received: from localhost ([127.0.0.1]:53749 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.82) (envelope-from ) id 1Zn0sf-0001s1-J3; Fri, 16 Oct 2015 05:00:53 -0400 Original-Received: by lola (Postfix, from userid 1000) id DEFF4E239A; Fri, 16 Oct 2015 11:00:52 +0200 (CEST) In-Reply-To: <5620BA34.1040600@cs.ucla.edu> (Paul Eggert's message of "Fri, 16 Oct 2015 01:49:56 -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:191728 Archived-At: Paul Eggert writes: > David Kastrup wrote: >> 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. > > In my spare time I've been working on something along those lines, but > it's not at all ready for prime time. Some Emacs code assumes that > integer overflow silently wraps around, and another common assumption > is that integers are = if and only if they are eq. Bignums violate > both assumptions. Yes. The LilyPond code base (running on GUILE) is riddled with code that assumes integers are eq. Fixing that is slow work. On the other hand, the unfixed code does not really work worse than Emacs' code works now: neither cannot handle values larger than standard integers. In order to get the same semantics as now, a GMP number should be converted back to a native LISP integer whenever it's small enough again. That provides some slight overhead for arithmetic that had to happen in GMP, but then we are outside of the main performance characteristic anyway. -- David Kastrup