Hacker News new | ask | show | jobs
by hamletdrc2 5299 days ago
Is speed /really/ the reason people don't use Groovy?

If that were true, then I think JRuby be more popular. It is faster yet remains dynamic. There are various efforts to make Groovy fast, but the ones I have seen require you to turn off some of the metaprogramming capabilities.

1 comments

True here. Groovy has truly pathological performance in some areas.

I wrote a web service that read and processed XML documents. They were large, but not enormous... Couple hundred kilobytes, usually. My first cut, using Groovy and its built in XML DSL, took up to 15 seconds to process a single document. Rewriting in Java/StAX, it was a couple hundred milliseconds.

From then on, my MO was to write my code in Groovy and then rewrite anything that got called more than a few times per request/run in Java. Groovy's fine for glue code, but its performance was a real barrier to regular use.

As for JRuby, I suspect it's because no matter how good JRuby is, it's a second-class citizen to "real" ruby in the Ruby ecosystem, and to built-for-the-JVM languages on the JVM side. It's a great product, but it does have a few impedance mismatches coming from either side.