4 ms·
Surprised this was written in Java - I thought Lisp did well in this area and Clojure is right there on the JVM.
by swah 12y ago
Surprised this was written in Java - I thought Lisp did well in this area and Clojure is right there on the JVM.
- fiatmoney 12y agoIt'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.
- billrobertson42 12y agoI agree with fiatmoney, and would also like to add that if you implement it in simple Java w/few dependencies, it makes it easier to use the library in many contexts. e.g. other JVM languages.
- haifeng 12y agoYes, we don't want it depending on third parties.
- shellac 12y agoMahout and especially Weka are popular in the field, both written in java.