News for hackers. Stuff that matters.
Re:The Second Coming of Java by raphinou on Wednesday September 25, 2013 @12:46PM (#6445664)
Did you test statically typed groovy? Does it have better performance?

As for clojure, how does its performance compare to groovy?

Really interested to know more!

Re:The Second Coming of Java by Zak on Wednesday September 25, 2013 @02:03PM (#6446203)
Clojure can be exactly as fast as Java within a function when type hints are used to avoid reflection. Calling Clojure functions has a little overhead relative to calling Java methods.

That said, an idiomatic system in Clojure will likely have a very different design than it would in Groovy or Java. Using Clojure's built-in immutable data structures, it's cheap in terms of CPU and memory to make a large number of modified copies or to concurrently access data compared to the standard collections in Java and Groovy. Single-threaded reading and writing are, however somewhat more expensive.

My prediction is that it's easier to get good performance out of a system with a lot of concurrency using Clojure than it is with Groovy or Java, though with careful design, it's possible to get better performance with Java.