Remix.run Logo
▲ weavejester 2 hours ago

Optimized Clojure is on par with Java in terms of performance, which isn't hugely slower than C++. More idiomatic Clojure is less performant, but typically you'll optimize the hot paths.

The main advantage Clojure has in LLM use is that it has a good REPL. LLMs are quite fast at writing code; the bottleneck is often the time it takes to compile and test that code, which is higher for most compiled languages than it is for an open REPL. A LLM writing Clojure typically has a faster iteration loop than one writing C++.

And while I have no hard evidence of this, I also wonder if Clojure's general design philosophy of reducing complexity (i.e. interconnectivity) is also a benefit for LLMs. My experience is that LLMs tend to be more effective the more isolated and unconnected a piece of code is, which Clojure is specifically designed around.