File: fread.sc

package info (click to toggle)
stalin 0.11-4
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 110,316 kB
  • ctags: 163,128
  • sloc: ansic: 1,757,574; lisp: 88,332; sh: 1,496; makefile: 371; sed: 100; csh: 30
file content (20 lines) | stat: -rw-r--r-- 745 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; File:         fread.sc
;;; Description:  FREAD benchmark
;;; Author:       Richard Gabriel
;;; Created:      11-Apr-85
;;; Modified:     11-Apr-85 20:39:09 (Bob Shaw)
;;;               24-Jul-87 (Will Clinger)
;;;               14-Jun-95 (Qobi)
;;;               31-Mar-98 (Qobi)
;;; Language:     Scheme
;;; Status:       Public Domain
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;; FREAD -- Benchmark to read from a file.
;;; Requires the existence of FPRINT.TST which is created by FPRINT.

(define (fread)
 (call-with-input-file "fprint.tst" (lambda (stream) (read stream))))

(do ((i 0 (+ i 1))) ((= i 1000)) (fread))