Programming Languages
Why Lisp Seems Easy for LLMs
A small observation from testing code across frontier models.
One thing I keep noticing is that large language models seem to process small Lisp programs faster and more reliably than equivalent code in many other languages.
My guess is that Lisp exposes the structure almost directly. The tree is right there in the text. There is very little syntax to recover before the model can start evaluating the program.
In a form like (if (+ 3 10) (- 10 3) (* 10 2)), the model does not have to infer precedence rules, statements versus expressions, or much incidental syntax at all. It can mostly just walk the tree.
That does not mean Lisp is magic. It just means regular structure matters. My current view is that LLMs do especially well when code already looks close to a normalized AST, and Lisp is one of the clearest examples of that.