[Openmcl-devel] slow read-char

Takehiko Abe keke at gol.com
Thu Jul 13 18:11:14 PDT 2006


The following codes take longer to complete with OpenMCL 1.0
than MCL 5.1:

(with-open-file (out "home:test.temp"
                     :direction :output
                     :if-does-not-exist :create)
  (dotimes (i 2097152)
    (declare (fixnum i))
    (write-char #\a out)))

(with-open-file (in "home:test.temp")
  (loop for char = (read-char in nil nil)
        for c from 0
        do
        (unless char
          (return c))))

E.g. the latter form that calls read-char takes aprox 3.5
times longer in my setup. It is as if no buffering takes
effects.

Does anyone have an idea what may cause the difference?

Thanks.





More information about the Openmcl-devel mailing list