3 ms·
If you stick to primitive operations like loop, if, let and data primitives, the bytecode generated by Clojure is the same as the bytecode generated by Java. C
by weavejester 12y ago
If you stick to primitive operations like loop, if, let and data primitives, the bytecode generated by Clojure is the same as the bytecode generated by Java.
Clojure's syntax isn't optimal for low-level in-place mutability, but macros can go some way to resolving that. The few times I've worked on high-performance Clojure code, it hasn't been too difficult to get performance comparable to an equivalent Java library.
Java is somewhat slower than C, but it's generally within an order of magnitude if you stick to primitives.