This is the mail archive of the
guile@cygnus.com
mailing list for the Guile project.
Re: performance
Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se> writes:
> Rob Browning <rlb@cs.utexas.edu> writes:
>
> > For RScheme I had to change (force-output) to (flush-output-port
> > (current-output-port)), and for stalin I had to delete the flush
> > altogether since it has no similar primitive. Stalin really does
> > provide astounding performance, and the executable was only 11k :>
>
> Send me the source of your benchmark.
Sure. It's just the oringal code without the flush-output-port.
Though if that flush is important, I have a message from the author
detailing how to get the same effect. If not, just save this in a
file stalin-speed-test.sc and compile it with:
$ stalin -Ob -Om -On -Or -Ot -du -dI -d1 -copt -O2 \
-copt -fomit-frame-pointer -copt -freg-struct-return \
-copt -I -copt /usr/include/gc stalin-speed-test.sc
(let ((circular-list ((lambda (p)
(set-cdr! (letrec ((loop (lambda (p)
(if (null? (cdr p))
p
(loop (cdr p))))))
(loop p))
p)
p)
(list "-" "-" "*"))))
(letrec ((loop
(lambda (i)
(letrec ((loop (lambda (i)
(if (< i 10000)
(begin
(set! circular-list (cdr circular-list))
(loop (+ i 1)))))))
(loop 0))
(if (equal? (car circular-list) "*")
(display i)
(display (car circular-list)))
(loop (+ i 1)))))
(loop 0)))
--
Rob Browning <rlb@cs.utexas.edu> PGP=E80E0D04F521A094 532B97F5D64E3930