Is there an estimate that says how much JSR-292 will impact Groovy performance?
invokedynamic is a complicated story really, since the performance characteristics changes all the time in JDK7. During porting Groovy to indy I got really, really near Java, about factor 1.5. But I have to use the catchExceptionGuard, which reduces performance to something like being factor 3-4. We still need to investigate ways to avoid having to use that guard. Maybe we will have to break some existing code in Groovy 2.2 for that. Anyway, I don't need the guard for the invokeMethod fallback as mentioned above. It is for GroovyRuntimeExceptions possibly containing other exceptions, that I have to unwrap or do other things with. So the theoretical possible performance seems to be between Java and half of Java speed for existing methods. Performance of calls to invokeMethod is a whole different story.
If you need more, then use @CompileStatic in Groovy 2.0.
I don't think there is a benchmark yet, and until someone performs it we can only guess...
You may find this post in this matter interesting.
It would be around 10-50 times faster in general.
http://www.mail-archive.com/[email protected]/msg00819.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With