23.03.2013 Views

Performance and Evaluation of Lisp Systems - Dreamsongs

Performance and Evaluation of Lisp Systems - Dreamsongs

Performance and Evaluation of Lisp Systems - Dreamsongs

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

196<br />

3.14.3 Translation Notes<br />

The INTERLISP code presented uses a Common <strong>Lisp</strong> array package written<br />

by Jonl White. Common <strong>Lisp</strong> arrays as implemented by this package are faster<br />

than the st<strong>and</strong>ard INTERLISP arrays.<br />

(RPAQQ FFTCOMS<br />

((FILES (SYSLOAD FROM LISPUSERS)<br />

CMLARRAY)<br />

(FNS FFT)<br />

(VARS (RE (MAKEARRAY 1025 (QUOTE INITIALELEMENT)<br />

0.0))<br />

(IM (MAKEARRAY 1025 (QUOTE INITIALELEMENT)<br />

0.0)))<br />

(MACROS IEXPT)))<br />

(DEFINEQ<br />

(FFT<br />

(LAMBDA (AREAL AIMAG)<br />

(PROG (AR AI PI I J K M N LE LE1 IP NV2<br />

NM1 UR UI WR WI TR TI)<br />

(SETQ AR AREAL)<br />

(SETQ AI AIMAG)<br />

(SETQ PI 3.141593)<br />

(SETQ N (ARRAYDIMENSION AR 0))<br />

(add N -1)<br />

(SETQ NV2 (LRSH N 1))<br />

(SETQ NM1 (SUB1 N))<br />

(SETQ M 0)<br />

(SETQ I 1)<br />

L1 (until (NOT (ILESSP I N))<br />

do (* Compute M = log (N))<br />

(add M 1)<br />

(add I I))

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!