From: Matt K. <kau...@cs...> - 2007-01-10 05:20:47
|
Hello -- I have recently tried an experiment with a program I'm working on (ACL2) in which I avoid explicit calls to compile-file, loading .lisp source files instead of the resulting .fasl files before saving an image. In SBCL 1.0 on Ubuntu, the program's regression suite ran significantly slower when I avoided compile-file (using the same unloaded machine both times). This surprised me, since my understanding is that SBCL always compiles. I did a similar experiment with OpenMCL and found no such slowdown (in fact I got a slight speedup by avoiding the compile-file calls). Here are the SBCL time results. With explicit compile-file: 20300.204u 246.139s 5:44:54.95 99.2% 0+0k 0+0io 0pf+0w Without explicit compile-file: 23021.082u 224.146s 6:30:23.08 99.2% 0+0k 0+0io 0pf+0w Here is the optimize declaim form, which is evaluated before the loading or compiling source files. (declaim (optimize #+(or cmu sbcl lucid lispworks) (compilation-speed 0) #+lispworks (debug 0) #+cmu (extensions:inhibit-warnings 3) #+sbcl (sb-ext:inhibit-warnings 3) (speed 3) (space #+cmu 1 #-cmu 0) (safety 0))) Any thoughts on what's going on? Is it something as simple but low-level as locality of code or the like? By the way, I found in an earlier version that a type error was missed when loading .fasl files but was caught when loading .lisp files, so I'm wondering if some optimization is missing when loading .lisp files. If so, then my model that compile-file is superfluous for SBCL is wrong (well, it's wrong of course based on the timing results). Thanks -- -- Matt Kaufmann |