5 ms·
On a tangentially related note, there's a project that aims to redesign some of Common Lisp's semantics to be more modern [0]. Its name is CL21, as it's meant t
by thegeomaster 11y ago
On a tangentially related note, there's a project that aims to redesign some of Common Lisp's semantics to be more modern [0]. Its name is CL21, as it's meant to be "Common Lisp for the 21st century", and it's written entirely in Common Lisp, relying on the kick-ass features of reader macros to introduce new syntax to the language. In my humble experience, integrating it with Shelly [1] and the large swath of Quicklisp [2] libraries can turn it into a terse and reasonably efficient scripting language. (Sadly, you still need a CL implementation and runtime, and they are mostly quite slow.) Definitely worth a look if you like NewLisp's syntax and libraries, as I can see some similarities in the philosophies.
[0]: http://cl21.org/ http://cl21.org/
[1]: http://shlyfile.org/ http://shlyfile.org/
[2]: https://www.quicklisp.org/beta/ https://www.quicklisp.org/beta/
- zeveb 11y ago> Sadly, you still need a CL implementation and runtime, and they are mostly quite slow. Say what now? SBCL is normally within a factor of 2 of C, and sometimes faster than C, and the commercial Lisps are even better.
- thegeomaster 11y agoI 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
- PackageUpgrades 11y agoCommercial Lisps are better? As in faster? Do you have any supporting evidence of this? Having used Lispworks and Allegro I can't see where this is coming from.