4 ms·
It's simple to compile because lisp is essentially a parse tree, which eliminates the parsing stage in compilation.
by yters 18y ago
It's simple to compile because lisp is essentially a parse tree, which eliminates the parsing stage in compilation.
- Hexstream 18y agoI was referring to the ability to traverse a tree structure (made of conses or objects) and generate a tree of closures from that. Instead of interpreting the tree structure, you make a first pass where you do a lot of dispatching in advance (at runtime you'll just do what you must do instead of first figuring out what to do and then do it), generating a tree of closures. Then you call your "top-level" closure for a nice optimized run. You can optimize your source tree before compiling this way, for some crazy speed. All this without having to read advanced books about low-level compilers, parsing, machine architecture and optimization!
- yters 18y agoV. interesting, thanks:)