[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Slow I/O part IV



There is an I/O benchmark in the Gabriel benchmarks.
About a year ago I compared MCL to VAX Common Lisp and
IBuki common lisp.  MCL was a lot slower on the fprint benchmark.
Here aer the results.

;(FPRINT) took 8381 milliseconds (8.381 seconds) to run; mac LC III, MCL 2.0
;CPU Time: 1.04 sec., Real Time: 2.27 sec. on VAX 8530, VAX COmmon LISP
;run time  : 0.320 secs real time : 0.960 secs;Silicon Graphics;IBUKI Common Lisp 

The code for the benchmark is as follows:

(defvar *test-atoms*
        '(abcdef12 cdefgh23 edfghij145 ijkl45 ijklmn56 klmnop67
          mnopqr78 opqrst89 qrstuv90 stuvwx01 uvwxyz12
          wxyzab23 xyzabc34 123456ab 234567bc 345678cd
          456789de 567890ef 678901fg 789012gh 890123hi))


(defun init-aux (m n atoms)
  (cond ((= m 0) (pop atoms))
        (t (do ((i n (- i 2))
                (a ()))
               ((< i 1) a)
             (push (pop atoms) a)
             (push (init-aux (1- m) n atoms) a)))))

(defun init (m n atoms)
  (let ((atoms (subst () () atoms)))
    (do ((a atoms (cdr a)))
        ((null (cdr a)) (rplacd a atoms)))
    (init-aux m n atoms)))
(defvar test-pattern (init 6. 6. *test-atoms*))

(defun fprint ()
  (if (probe-file "fprint.tst")
      (delete-file "fprint.tst"))
  ;;; defaults to STRING-CHAR
  (let ((stream (open "fprint.tst" :direction :output)))
    (print test-pattern stream)
    (close stream)))

;(time (fprint))
-- 
Rodrigo Vivanco

                  e-mail: vivanco@ccu.umanitoba.ca
                          vivanco@eeserv.ee.umanitoba.ca