Neat! One thing to mention, I would remove most of the benchmarks, and include only clisp, sbcl (I guarantee you this one is the fastest), clozure cl (ccl), and abcl.
Despite its humble size, this is a pretty sophisticated Lisp implementation. Not that one that can only do some additions, but also macros and stuff.
Kudos for doing the Lisp thing right.
UPDATE: Took one more look, this implementation is really impressive. It does stuff like 'defmacro', the whole code is just 1400 lines of C#. Never saw anything that effective in terms of functionality per line of code till this day. Impressive, very impressive. Also thanks for sharing.
Good job Mr. Suzuki. You effort on C# 7 optimization shows, the result is clean and professional.
Regarding the speed of .NET implementation, it can be improved by leveraging LINQ expressions trees. In this way, one can achieve a good interpreter/JIT combo. The compiled code produced by LINQ expression trees is discardable. So you can temporarily cache it for frequent Lisp expressions (this gives JIT performance), and then discard rarely used parts of it (this gives a flexibility of an interpreter).
I'm myself in a Scheme camp of Lisp, but I love your implementation. This is the cleanest one I saw in years.
7 comments
[ 3.4 ms ] story [ 30.1 ms ] threadKudos for doing the Lisp thing right.
UPDATE: Took one more look, this implementation is really impressive. It does stuff like 'defmacro', the whole code is just 1400 lines of C#. Never saw anything that effective in terms of functionality per line of code till this day. Impressive, very impressive. Also thanks for sharing.
Regarding the speed of .NET implementation, it can be improved by leveraging LINQ expressions trees. In this way, one can achieve a good interpreter/JIT combo. The compiled code produced by LINQ expression trees is discardable. So you can temporarily cache it for frequent Lisp expressions (this gives JIT performance), and then discard rarely used parts of it (this gives a flexibility of an interpreter).
I'm myself in a Scheme camp of Lisp, but I love your implementation. This is the cleanest one I saw in years.