I see that the recent release of Groovy 2.0 includes optional static compilation along with several other added benefits, like optional static type checking. After doing a bit of a search, I haven’t been able to find any extensive benchmarks comparing Groovy’s performance (with static compilation) to Java and perhaps Scala. Does anyone know of any such performance comparisons? Can we assume that it is the same as Groovy++ was before it died? If it’s performance is comparable, would Groovy be a viable alternative for a large, performance-critical application?
I see that the recent release of Groovy 2.0 includes optional static compilation along
Share
There are some benchmarks here (though it’s hard to see what’s going on)
However, taking the Groovy 1.8.2
Fibsource code from the bottom of the page, and running it in groovy 2.0 gives you:Putting
@groovy.transform.CompileStaticat the top of the script gives you:Obviously, this is not a complete benchmark (it’s only testing one thing), it doesn’t include warmup or anything, and Groovy 2.0 has only been out a week, however it does hint towards a good speed improvement in this situation…