chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] performance of bignums


From: cowan
Subject: Re: [Chicken-users] performance of bignums
Date: Thu, 25 Jun 2015 17:19:14 -0400
User-agent: SquirrelMail/1.4.21

Peter Bex scripsit:

> Of course, Guile is "cheating" by using GMP.  If I compare it to another
> Scheme which has its own bignum implementation like Gauche, we perform
> about the same.  It's interesting that sbcl is doing so well.  Maybe I'm
> overlooking something seemingly minor but important?

Here's a remark from the SBLC ideas page that may be helpful:

Integer division is notorious for being slow. However, it is also known
that the divisor is constant in the vast majority of cases, and serious
compilers exploit that fact to simplify divisions into sequences of simpler
multiplications, shifts, and additions. SBCL implements such a
simplification only for truncated division of unsigned machine words. Floor
and ceiling are less commonly supported natively in programming languages,
and there is a dearth of literature describing how to simplify them.
However, it is possible to do so, for both signed and unsigned machine
integers. It is also possible to specialise the routines for tagged
arithmetic. A complete execution of this project would include the
development of simplification routines for signed and unsigned truncate,
floor and ceiling divisions by integer constants. Some of the
simplifications, particularly those concerning tagged integers, will be
widely applicable and likely novel.




reply via email to

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