Predictably Fast Clojure
summary
Clojure achieves Java-like speed if you remove its generality: microbenchmarks show 5 ns vs 10 ns for direct dot calls vs core indirection, a subsequence loop can jump to ~200 ns, and reflective calls cost about 1 microsecond reflection. Tools used: no-disassemble to inspect bytecode, unchecked-add and type hints to get LADD performance, and libraries built: primitive-math (errors when escaping primitive assumptions), bstreams (memoization tradeoffs), tuples (faster first/nth), let-mutable (safe lexical mutation), plus vertigo/immutable-bitset/automat/narrator.
AI-written summary · about








