[Openmcl-devel] PPC Floating-Point Compiler for MCL/OpenMCL
Randall Beer
beer at eecs.cwru.edu
Fri Feb 7 10:33:25 PST 2003
I'm releasing version 0.1 of FPC-PPC, a floating-point compiler for MCL
and OpenMCL.
The source code and documentation can be found in the Software section
at
http://vorlon.cwru.edu/~beer
FPC-PPC compiles Lisp double-float expressions directly into PPC
assembly language, producing code that is usually significantly faster
and that allocates much less memory than the Lisp compiler.
For example, the following function takes about 370 ms to execute
100,000 times (on a 1GHz PowerBook G4; not including GC time) and
allocates 14.4MB of memory on MCL 5.0b:
(defun euclidean-distance-3 (x1 y1 z1 x2 y2 z2)
(let ((dx (- x1 x2))
(dy (- y1 y2))
(dz (- z1 z2)))
(sqrt (+ (* dx dx) (* dy dy) (* dz dz)))))
Using FPC-PPC, the following executes in just 33 ms and allocates *no*
memory:
(define-double-function %euclidean-distance-3 (x1 y1 z1 x2 y2 z2)
(let ((dx (- x1 x2))
(dy (- y1 y2))
(dz (- z1 z2)))
(sqrt (+ (* dx dx) (* dy dy) (* dz dz)))))
(setf x! (%copy-float 0.0))
(time
(dotimes (i 100000)
(%set-double! x! (euclidean-distance-3 1.0D0 2.0D0 3.0D0 4.0D0
5.0D0 6.0D0))))
This is a PRELIMINARY release. Comments and bug reports are welcome.
Randy Beer
_______________________________________________
Openmcl-devel mailing list
Openmcl-devel at clozure.com
http://clozure.com/cgi-bin/mailman/listinfo/openmcl-devel
More information about the Openmcl-devel
mailing list