Open fukamachi opened 10 years ago
This is discussed in #10 and @guicho271828 has implemented the compilaton system. Basically, I'm forward to merge the PR but since that patch contains many separated features and require to rewrite many other parts, merging is delayed. Please wait a while.
I suppose the execution time of 'cl' is not a matter for you currently. So, actually, this is not an issue, but I want to share what I found and want to try suggesting something.
What makes 'cl' slow?
You know, 'cl' command is quite slow even the
--eval
form is a simple one.If I add
--no-init
option and prevent loading Quicklisp, it would be about 10 times faster.It takes about 90% of its execution time to just loading Quicklisp.
How can we make it faster?
Seemingly, there's no way to avoid it, but 'cl' command got
--core
to other load Lisp core file in #17. We can avoid this startup time just by creating a Lisp core file already loaded Quicklisp.But, it's still slow
Now it runs 10 times faster than before, but it is still slow. 'sbcl' command is still 11 times faster than 'cl' command.
The difference is came from
~/.cim/lib/script.lisp
. 'cl' command always loads it from a source file.If the source file would be compiled, the execution time would be better. As
--load
option always use the file, even if there's a fasl file for it. This means 'cl' command compiles & loads~/.cim/lib/script.lisp
every time.And made a change to
scripts/cl
just for trial.Then it would be about 3 times faster.
Conclusion
Though 6% looks not a big deal, it is still 4 times slower than 'sbcl' command.
I think "using fasl file" is not so good idea because then we need to manage "fasl" files for each implementation. It makes CIM very complicated.
I'm trying to use 'cl' command as a backend of 'shly' command of Shelly, so I hope 'cl' command is as fast as possible.
Are there any ways to make it faster?