chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] Possible chicken performance tweak


From: felix winkelmann
Subject: Re: [Chicken-hackers] Possible chicken performance tweak
Date: Wed, 7 Mar 2007 15:32:22 +0100

On 3/6/07, Tony Sidaway <address@hidden> wrote:
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.

Hm... I don't know... What about (probably machine generated) really
large files on low-memory machines? Also, is the performance improvement
really significant in this situation?


cheers,
felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]