guile-user
[Top][All Lists]
Advanced

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

Re: The Guile license and the use of LGPL libs (like GMP).


From: Rob Browning
Subject: Re: The Guile license and the use of LGPL libs (like GMP).
Date: Tue, 21 May 2002 18:44:24 -0500
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2 (i386-debian-linux-gnu)

address@hidden (Carl R. Witty) writes:

> You might want to run some benchmarks before you decide on GMP.

Yeah, thanks.  I'm working on trying to get some together.  I was
planning to try to do some benchmarking before I actually proposed
committing the GMP bignums.  In the future I'd like to make it so that
we can benchmark guile fairly easily, so people can evaluate (in at
least some sense) various changes.  Of course it's hard to develop a
"really good" set of benchmarks, heck it's hard to even define what
"really good" means, but it would be nice to be able to get some sense
that you haven't made things terribly, obviously worse...

> My impression (from the last time I looked at the issue, maybe a
> couple of years ago) is that GMP is intended to be asymptotically
> fast on large numbers, but that it's not particularly fast on
> smaller numbers.  (For instance, you certainly wouldn't want to get
> rid of fixnums and use GMP numbers for all numbers;

Definitely not.  The GMP integration I'd done so far was only for
bignums, fixnums are untouched.

> it, GMP had no optimization for small numbers at all, so computing
> something like 2*2 would take about 6 function calls and several
> loops.

Right, I'm not planning on going there :>

> Does anybody have any idea what distribution of numbers is typical
> in programs with bignums?  For instance, are most numbers that are
> bigger than 32 bits in the 32 to 64 bit range, or are there lots of
> numbers with hundreds of bits?  (I don't suppose anybody really
> knows the answer to this question, but you'll have to make a guess
> before you can decide whether one implementation is faster than
> another.)

Probably entirely application specific.  I doubt the most common users
of guile (one of which is gnucash) use bignums all that often... or do
they? :> Come to think of it, in gnucash the dates are stored as a
cons pair (secs-since-epoch-utc . ns), so these days, the secs are
well over fixnum size.  Of course on 64-bit machines, if you have 6X
bit fixnums, bignums would be rare.

-- 
Rob Browning
rlb @defaultvalue.org, @linuxdevel.com, and @debian.org
Previously @cs.utexas.edu
GPG=1C58 8B2C FB5E 3F64 EA5C  64AE 78FE E5FE F0CB A0AD



reply via email to

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