[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Allegro CL Floating Point
Date: Thu, 30 Nov 89 15:29:37 EST
From: email@example.com.ARPANET (Anthony Maida)
We need to do fast floating point in Lisp. We have benchmarked
a C program and a Lisp program. Both programs call an exponential
function and a trig function 250,000 times.
The C program runs in under 10 seconds. The Lisp program takes
at least 50 seconds. We can't understand why there should be
such a discrepancy. Can anyone replicate this and explain the
I don't have a copy of Allegro, but I tried it in Lucid on a Sun 3/60
and it ran in .18 seconds.
> (load "float-test")
;;; Loading source file "float-test.lisp"
;; turn on production compiler
> (proclaim '(optimize (compilation-speed 0)))
> (compile 'speed)
> (time (speed 500))
Elapsed Real Time = 0.18 seconds
Total Run Time = 0.18 seconds
User Run Time = 0.18 seconds
Dynamic Bytes Consed = 0
When I similary compiled SPEED with just the development compiler,
(proclaim '(optimize (compilation-speed 3))), the execution took about