Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.lisp
Re: why Lispworks' file i/o way slower than Clisp?
William James
10/15/2015 5:40:00 AM
corps wrote:
> (defun count-line ()
> (with-open-file (in "E:/test.txt")
> (loop for line = (read-line in nil nil) with total = 0 while line
> do (incf total) finally (print total))))
Gauche Scheme:
(define (count-lines)
(with-input-from-file "tmp.txt"
(lambda ()
(generator-fold (lambda (line cnt) (+ 1 cnt)) 0 read-line))))
--
Man is a social animal just like ants or bees or wolves. All have their living
space, which they defend to the very end. ---
http://www.kolumbus.fi/aquilon/aquilon...
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: why Lispworks' file i/o way slower than Clisp?
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password