raybench icon indicating copy to clipboard operation
raybench copied to clipboard

Could you compile the Common Lisp file?

Open orront opened this issue 6 years ago • 6 comments
trafficstars

Could you open up SBCL and time (progn (compile-file “lisprb.lisp”) (load “lisprb.fasl”))? To my knowledge the SBCL shebang script option does not compile to FASLs.

orront avatar Apr 25 '19 18:04 orront

Will do, although I might not be able to test this soon. Thanks for the heads up.

niofis avatar Apr 25 '19 19:04 niofis

--script doesn't create a .fasl file, but by default sbcl compiles all non-trivial forms as part of evaluation, so it is running compiled code for the benchmark.

That does mean it is including the cost of compilation in the total runtime unlike C, but that is still a fairly small part of the total time.

3b avatar May 02 '19 10:05 3b

to compile separately, remove the (main) call from lisprb.lisp and do something like

sbcl --load lisprb.lisp --eval '(sb-ext:save-lisp-and-die "lisprb" :executable t :toplevel (function main))'
or
sbcl --load lisprb.lisp --eval '(sb-ext:save-lisp-and-die "lisprb" :executable t :toplevel (function main) :compression t)'

sbcl executables are fairly large, since they include entire runtime library, compiler, etc. Compression makes them smaller, but might make them slower (or faster) to load depending on relative speed of drive/ram/cpu/etc.

Difference in times for compressed vs uncompressed vs --script seems to be pretty much lost in the noise for me though.

3b avatar May 02 '19 10:05 3b

#29

guicho271828 avatar Aug 30 '21 17:08 guicho271828

Could you please rerun the benchmarks, optimally on a more recent CPU, and update the results in the README.md?

bpecsek avatar Sep 09 '21 14:09 bpecsek

Any chance to update the README.md to reflect the speed of the PR-ed lisp codes?

bpecsek avatar Sep 17 '21 20:09 bpecsek