I tweaked my copy of chicken.scm to read each input file into a string
and then compile from the string. The time saved seems to be of the
order 10% on my laptop system, when tested on the 2100-line
posixunix.scm.
(let* ((f (car files))
(fs (with-input-from-file f read-string)) ; NEW: read into
string
;;;(in (check-and-open-input-file f))
(in (open-input-string fs)) ; NEW: open string file
(x1 (read-form in)) )
(do ((x x1 (read-form in)))
((eof-object? x)
;;;(close-checked-input-file in f)
#t ; NEW: placeholder in the (do) form.
)
(set! forms (cons x forms)) ) )
Trace information, containing filename and line number, is unaffected.
The change seems to be transparent.