With everything I've done using Groovy in production websites, I've
never noticed any performance hits vs Java and Groovy. That being
said, I've used Groovy as a scripting language (meaning non-compiled in
this reference) and compiled classes. With as much traffic as I've had
hitting those sites I have not found any hits on performance.
In
addition, I've used Groovy extensively with JME (
jmonkeyengine.com) in
scripting and compiled classes and have yet to notice any differences
in framerates, game play, sound, movement, etc.
I don't know anything about the benchmarks between JRuby and Ruby vs Java/Groovy.... whatever.
I
can say that compiled classes (according to internal class time prints)
perform the same as the Java ones (which was to be expected)
As
for the Groovy scripts (non-compiled), there was an original lag when
the script is first loaded into the jvm, but nothing after that (and
the lag was < 200ms... negligible at best -- unless you compound
that by hundreds of scripts, which is another argument).
Statistics can prove and disprove any point of view. If you want to try, simply take a few Java classes rename them .groovy and run them with your own performance tests, see what happens... if there's anything that's too catastrophic for your tastes, then put the .java back on there and go back... But don't forget to go compiled and non-compiled Groovy scripts just to ensure a well-rounded test.
timo
On Sun, Feb 24, 2008 at 3:25 PM, Brian Schlining <
bschlining@...> wrote:
> To me the Groovy performance is absolutely sufficient because of the
> easy integration with Java. If something's too slow, I do it in Java.
It sounds a bit like denial of the performance relevance.
Groovy can be slow and the alioth benchmarks seem to be particularly unfriendly to Groovy. Personally, I wouldn't write compute intensive numerical models in it (Others may beg to differ). However, I use Groovy for writing complex 'buisness' logic against databases. About 90% of the application time is spent in database calls; so basically it doesn't matter how fast the language is. The amount of development time I save for writing in Groovy is worth the performance hit; Groovy is more than fast 'enough' for my application.
I'm not dismissing the fact that Groovy would benefit from optimization. But it's a young language and progressing rapidly. I'm optimistic that performance will get much better in the near future.
--
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Brian Schlining