home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume1 / 8707 / 49 / fread.cl < prev    next >
Encoding:
Text File  |  1990-07-13  |  844 b   |  28 lines

  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ; File:         fread.cl
  3. ; Description:  FREAD benchmark
  4. ; Author:       Richard Gabriel
  5. ; Created:      11-Apr-85
  6. ; Modified:     11-Apr-85 20:39:09 (Bob Shaw)
  7. ; Language:     Common Lisp
  8. ; Package:      User
  9. ; Status:       Public Domain
  10. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  11.  
  12. ;;; FREAD -- Benchmark to read from a file.
  13. ;;; Pronounced "FRED".  Requires the existance of FPRINT.TST which is created
  14. ;;; by FPRINT.
  15.  
  16. (defun fread ()
  17.   (let ((stream (open "fprint.tst" :direction :input)))
  18.     (read stream)
  19.     (close stream)))
  20.         
  21. (eval-when (load eval)
  22.   (if (not (probe-file "fprint.tst"))
  23.       (format t "~%Define FPRINT.TST by running the FPRINT benchmark!")))
  24.  
  25. ;;; call: (fread))
  26.  
  27. (run-benchmark "Fread" '(fread))
  28.