3 ms·
I was referring more to their startup time. The runtime introduces delay when you type in the script command on a CLI. Regardless of that, the factor-of-two-or
by thegeomaster 11y ago
I was referring more to their startup time. The runtime introduces delay when you type in the script command on a CLI.
Regardless of that, the factor-of-two-or-sometimes-faster argument sounds a little far-fetched for me, care to provide some sources on the benchmarks? Not saying it's not true, I'm just not accustomed to seeing highly extensible and dynamically-typed languages such as Common Lisp perform so fast.
- PackageUpgrades 11y agosbcl is fast, and can be really fast. Especially compared to the other cl implementations.
- dmm 11y agoCheck out the benchmark game for some decent benchmarks of various languages. Here's sbcl vs gcc c: https://benchmarksgame.alioth.debian.org/u64q/benchmark.php?test=all&lang=sbcl&lang2=gcc&data=u64q https://benchmarksgame.alioth.debian.org/u64q/benchmark.php?... On several benchmarks sbcl is less than three times slower than c. And I never noticed a startup delay with sbcl. Let's do a simple test. $ echo 'print("hello")' > test.py $ echo '(format t "hello")' > test.lisp $ time python test.py hello real 0m0.033s # 33ms user 0m0.027s sys 0m0.003s $ time sbcl --script test.lisp hello real 0m0.006s # 6ms user 0m0.000s sys 0m0.003s # I couldn't figure out how to run newlisp w/o starting # the interactive interp so I'll give it a string $ time newlisp -e '(print "hello")' hello"hello" real 0m0.002s # 2ms user 0m0.000s sys 0m0.000s So sbcl starts up about 5 times faster than python, which lots of people use for scripting. newlisp seems to startup about 4ms faster than sbcl. I really don't see a scenario where the startup time of sbcl is a problem. Just for fun let's look at java. $ java -version openjdk version "1.8.0_60" OpenJDK Runtime Environment (build 1.8.0_60-b24) OpenJDK 64-Bit Server VM (build 25.60-b23, mixed mode) $ time javac hello.java real 0m0.386s # ouch user 0m0.910s sys 0m0.040s $ time java hello hello real 0m0.066s # 66ms, once compiled user 0m0.067s sys 0m0.007s