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.

232<br />

3.18 File Read<br />

3.18.1 The Program<br />

;;; FREAD -- Benchmark to read from a file.<br />

;;; Requires the existence <strong>of</strong> FPRINT.TST which is created<br />

;;; by FPRINT.<br />

(defun fread ()<br />

(let ((stream (open "fprint.tst" :direction :input)))<br />

(read stream)<br />

(close stream)))<br />

(eval-when (compile load eval)<br />

(if (not (probe-file "fprint.tst"))<br />

(format<br />

t<br />

"~%Define FPRINT.TST by running the FPRINT benchmark!")))<br />

;;; call: (fread))<br />

3.18.2 Analysis<br />

This benchmark tests file input. It reads the file produced by FPRINT.<br />

3.18.3 Translation Notes<br />

The translation <strong>of</strong> this benchmark is trivial.

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

Saved successfully!

Ooh no, something went wrong!