From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.devel Subject: Re: Using the GNU GMP Library for Bignums in Emacs Date: Mon, 23 Apr 2018 07:19:22 +0200 Message-ID: References: <29f933ac-a6bf-8742-66a7-0a9d6d3e5a88@disroot.org> <83bmecy6fx.fsf@gnu.org> <0d3175d8-d996-651e-b221-71978bde3a65@cs.ucla.edu> <51e619e0-ee38-eb97-6c1d-0925b675290a@disroot.org> <8e12135a-0fcc-7aa3-d000-731d2f26d918@disroot.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1524460664 10754 195.159.176.226 (23 Apr 2018 05:17:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 23 Apr 2018 05:17:44 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 23 07:17:40 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fATr9-0002eC-Sf for ged-emacs-devel@m.gmane.org; Mon, 23 Apr 2018 07:17:39 +0200 Original-Received: from localhost ([::1]:41003 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fATtE-0005Ze-KE for ged-emacs-devel@m.gmane.org; Mon, 23 Apr 2018 01:19:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59619) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fATt3-0005Xo-Le for emacs-devel@gnu.org; Mon, 23 Apr 2018 01:19:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fATsz-0007GJ-My for emacs-devel@gnu.org; Mon, 23 Apr 2018 01:19:37 -0400 Original-Received: from [195.159.176.226] (port=37017 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fATsz-0007Fs-GQ for emacs-devel@gnu.org; Mon, 23 Apr 2018 01:19:33 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1fATqq-0002Lo-4W for emacs-devel@gnu.org; Mon, 23 Apr 2018 07:17:20 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 18 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:xXsarrWXc/jrgkZPwook1D4LdTY= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 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:224800 Archived-At: On Sun, Apr 22 2018, Paul Eggert wrote: > Most integer > computation will likely be fixnum only, and the only slowdown there > will be integer overflow checking that we currently aren't doing. With > decent hardware and compiler, I'd guess this would cost us three > machine instructions per Lisp arithmetic operation, including the > conditional branch that is typically not taken. Hardly anybody will > notice. Out of curiousity: what's the quickest way to detect overflow on multiplication in ANSI C? E.g. int64_t x, y, result; result = x * y; if () Helmut