gcl-devel
[Top][All Lists]
Advanced

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

[Gcl-devel] GMP used for gcd


From: Camm Maguire
Subject: [Gcl-devel] GMP used for gcd
Date: Fri, 20 Aug 2004 11:27:30 -0400
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (Unebigory ōmae) APEL/10.3 Emacs/21.2 (i386-debian-linux-gnu) MULE/5.0 (SAKAKI)

Greetings!  This was a support item:

Implemented in CVS.  Some timings:

>(with-open-file (s "/tmp/ff" :direction :output)  (dotimes (i 50000) (let ((a 
>(random '40000000000000)) (b (random '40000000000000))) (format s "~S~%"  
>(cons (list 'gcd a b) (gcd a b))))))
NIL

>(time (with-open-file (s "/tmp/ff") (do () ((let ((a (read s nil nil)) ) 
>(unless (or (not a) (equal (eval (car a)) (cdr a)) (error "~S ~S~%" a (eval 
>(car a))))) (not a))))))

real time       :      1.020 secs
run-gbc time    :      0.930 secs
child run time  :      0.000 secs
gbc time        :      0.100 secs
NIL


New:

(time (with-open-file (s "/tmp/ff") (do () ((let ((a (read s nil nil)) ) 
(unless (or (not a) (equal (eval (car a)) (cdr a)) (error "~S ~S~%" a (eval 
(car a))))) (not a))))))

real time       :      0.610 secs
run-gbc time    :      0.590 secs
child run time  :      0.000 secs
gbc time        :      0.000 secs
NIL

>

Please test.

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]