guile-user
[Top][All Lists]
Advanced

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

Guile uses GNU MP


From: Joerg Kreienbuehl
Subject: Guile uses GNU MP
Date: Tue, 19 Sep 2000 15:02:25 +0200 (MET DST)

Hello!

I have changed numbers.(c|h) so that it uses the GNU MP (GMP).  The changed
files (Release 1.4) are in

http://n.ethz.ch/student/joergk/download/guile/

I deleted all code belonging to the old bignum implementation and replaced
it with calls to some older GMP.  I had to chanhe gc.c to have the GMP
bignums garbage collected like ordinary smobs.


On my PII 266 with 64MB it now computes (factorial 10000) in about two
seconds, if no garbage collection occurs.  If gc is activated however,
guile performs the calculation within 200KB and calls gc several times.
The whole thing takes about 25 seconds (!), but this is still twice as fast
as the old implementetation. (I do not garantee for theese figures)

Before I think about gc tuning, theres some work to do:
  - The calls to GMP-Functions should be #ifdefed and configure must
    provide a HAVE_GMP flag.  The code could probably changed, so that some
    key functions return doubles instead of bignums, so that most of the
    other functions don't have tho bother about HAVE_GMP
  - Probably I can simplify some functions that check for every possible
    combination  of types.
  - Test!
  - Add GMP rationals

As I am not a autoconfig/automake guru, probably someone could make the
nessecary changes for GMP.  And if someone has a testfile to test
arithmetics, just send it to me!

Joerg Kreienbuehl




reply via email to

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