I ported the Java code of the Havlak benchmark from Robert Hundt (see link) to Groovy. Now I run the benchmark with Groovy 2.1.1 with invoke dynamic and without, but the duration the computation takes is almost the same. What did I do to enable invoke dynamic? I copied the groovy--indy.jars from groovy-2.1.1\indy to groovy-2.1.1\lib. Then I deleted in groovy-2.1.1\lib all the groovy.jars wihtout "indy" in their name. Thereafter, in IntelliJ IDEA I enabled and disabled the flag File > Settings > Compiler > Groovy Compiler > Invoke dynamic support.
I'm just telling this to make people see whether I turned on indy support correctly. But this is not my question. My question is in what kind of situations can we expect a speed up in computation time, because of invoke dynamic. I read articles about it, but it is hard to translate what is explained there about what invoke dynamic does into some statement that "this kind of code will execute faster with indy support". The Havlak benchmark does a lot of looping where values are changed through calling setters.
I'd be glad if anyone having some understanding of the matter would drop some explanations here :-).
Thanks, Oliver