emacs-devel
[Top][All Lists]
Advanced

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

Re: Using the GNU GMP Library for Bignums in Emacs


From: Helmut Eller
Subject: Re: Using the GNU GMP Library for Bignums in Emacs
Date: Mon, 23 Apr 2018 07:19:22 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

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 (<how to detect overflow?>)

Helmut




reply via email to

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