4 ms·
It's easier to achieve a high level of performance in raw, idiomatic Java than in Clojure. Eg, it's really important to be able to mutate arrays directly and u
by fiatmoney 12y ago
It's easier to achieve a high level of performance in raw, idiomatic Java than in Clojure. Eg, it's really important to be able to mutate arrays directly and use primitives with no boxing. You can do that kind of thing in Clojure, but it just ends up looking like Java with parens instead of squirrely brackets and more explicit casting.
The proper use for Clojure is to express higher-order application logic more concisely, not to implement high performance math algos.
- dmichulke 12y agoWell, there are "high-performance things" I like more in Clojure, for example: - areduce / amap - Uncleaned data is often of Object type (due to missing or invalid values) upon which one can apply the complete core.reducer functions without intermediate representations. In Java this would be horrible. Still, you're right in the sense that Clojure execution isn't fast than Java's, just its development.
- aaron_m04 12y agoTransients (mutable Clojure collection types) are also high performance.