gcl-devel
[Top][All Lists]
Advanced

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

[Gcl-devel] Re: Lisp tests


From: Camm Maguire
Subject: [Gcl-devel] Re: Lisp tests
Date: 24 Jun 2005 00:06:39 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Greetings!

Robert Boyer <address@hidden> writes:

> Concerning an extremely short, specific Lisp test, and given the
> popularity of multiplying distinct primes due to RSA, I propose the
> test of calculating and multiplying the two largest known distinct
> primes.
> 
> ; cf. http://primes.utm.edu/largest.html#biggest
> 
> (time (> (* (1- (expt 2 25964951))  ; Mersenne 42?
>             (1- (expt 2 24036583))) ; Mersenne 41?
>          1))
>          
> 
> Comparison of a few Lisps and Lisp wannabees.
> 
> implementation     time                       Machine used
> 
> GCL 2.7.0:         7 seconds                  (fast Dell, Debian-Gnu-Linux)
> Clisp 2.33:        error: too big             ..
> Allegro EE 6.2:    error: too big             ..
> CMU Lisp 19a:      error: too big             ..
> Guile 1.4:         error: too big             ..
> Emacs Lisp 20.7.1: wrong answer               ..
> Xemacs Lisp:       wrong answer               ..
> Python 2.2.1:      ?much more than 10 minutes ..
> Open MCL:          4 minutes                  1 GHz PowerPC G4
> 
> Bob
> 
> P. S.  How few implementations of programming languages exist!
> 

:-)  I'm hoping very much that gcl can evenutally be a unifying, rather
than a further fragmenting, force in thie regard.

Also thought it worth mentioning in case there are serious users in
this area that we can likely do significantly better here simply by
compiling a libgmp optimized for the particular hardware.  Most modern
processors have some SIMD parallelism, i.e. sse instructions on x86,
which will seriously accelerate computations of this magnitude.  For
generic bignum use, one can never see the difference.  To portably
provide the speedup on the huge problem, however, one has to devise a
way to load the best gmp library at runtime depending upon the
capabilities of the running cpu.  Most modern Linux systems have a
dynamic linker loader which can do this by specifying preferences to
different directories under /usr/lib containing alternate
binary-compatible versions of the library.

Take care,


> 
> 

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

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