On May 24, 2007, at 1:50 PM, Bradley Lucier wrote:
(define a (time (expt 3 2095903))) (define b (time (expt 7 1183294))) (define c (time (expt 11 1920505)))
On my desktop (2.0GHz PowerPC 970, gcc 4.1.2, 64 bit): 4.0b22 gmp 4.2.1
(* a b) .352 .13 (quotient c a) 1.744 .59 (integer-sqrt c) 1.813 .46 (gcd a b) 24.071 36.56
For bigger numbers, with about 10,000,000 digits,
(define a (time (expt 3 20959032))) (define b (time (expt 7 11832946))) (define c (time (expt 11 19205051)))
We compare somewhat better:
(* a b) 3.883 1.86 (quotient c a) 18.560 10.58 (integer-sqrt c) 20.096 8.65 (gcd a b) 339.918 5515.79
So now any aliasing improvements, code generation, etc., will improve the gambit times. The gmp kernels are already written in assembler.
Brad