3 ms·
Either I don't understand, or you are mistaken. Clojure is significantly slower than Java and Scala in the shootout. Presumably Hotspot kicks in, or doesn't, mo
by kikibobo69 16y ago
Either I don't understand, or you are mistaken. Clojure is significantly slower than Java and Scala in the shootout. Presumably Hotspot kicks in, or doesn't, more or less equivalently in all 3 cases. The dynamic languages (Clojure, Groovy, JRuby) are all slower than the statically typed languages (Java, Scala); what else would cause that?
- loewenskind 16y ago>what else would cause that? How much work the code that they generate does. Clojure is mostly pure right? If you have, e.g. a btree and you change some nodes the old notes won't get deleted, a new tree will be created where some of the nodes point to the still valid old ones and some point to your changes. That's more work then just mutating the variables.
- gtani 16y agoThis raises an interesting question for igouy: there are dozens of jvm knobs you can pull to optimize each benchmark: "-server", "XX:MaxInlineSize", the many "XX" options to play with GC etc. I'm assuming that the same settings would be used for java, scala, and groovy for any single benchmark, but are these switches tuned for that particular benchmark, or the same used for all benchmarks?