[gambit-list] New fft bignum multiplication

Bradley Lucier lucier at math.purdue.edu
Wed May 23 10:27:30 EDT 2007


I ran the tests on my opteron server (2.2 GHz, RHEL 4, gcc-4.1.2)  
after compiling mzscheme 370 on the box.  Previously I used the  
prebuilt (presumably 32-bit) mzscheme binaries and native 64-bit  
gambit binaries on MacOS, but this build uses 64-bit operations in  
both the mzscheme and gambit libraries, and mzscheme looks better  
here.  If mzscheme were to use the fft multiply routines in gmp it  
would look better still; with the current binaries of gsi/gsc and  
mzscheme, mzscheme would look worse for larger numbers.

Anyway, here are the results:

                                                   370       b22

(expt 3 1000000)  ; a                             124        89
(expt 3 1000001)  ; b                             126        89
(* a a)           ; c                             221       106
(* a b)           ;                               221       150
(quotient c a)    ;                               560       687
(sqrt c)          ;                               402       667
(gcd a b)         ; note 1                       1959      2708
(* a b)                                            62        62
(expt1 3 1000000) ; note 2                        124        85
(expt2 3 1000000) ; note 3                        362       370
(* a a)           ; a=3^1000000                   221       105
(expt 10 10000000); a                             228       193
(fib 10000)        ; note 4                        33        29
(factorial 10000) ; note 5                        137       158
(partial-factorial 0 10000) ; note 6                9        13
(binary-splitting-compute-e 10000) ; note 7       539       968
(binary-splitting-compute-pi 10000) ; note 9      716      1220
(pi-brent-salamin) ; n. 10, beta^k=10^100000     2646      3939
(pi-brent-salamin) ; beta^k=2^332193             1486      2889



More information about the Gambit-list mailing list