bytenotes asked: Would java 7 invokedynamic compensate in speed for what groovy++ does with @Typed?
Hi bytenotes,
Here’s Jochen Theodorou’s answer:
“The performance of inveokedynamic is said to be a little less good as a nor invocation, but not much. There is higher initial cost because of the method selection and such. But there are still many cases in real life using invokedynamic that need adjustments by the VM authors. invokedynamic is still work in progress performance wise.
So it is difficult to answer if Groovy with invokedynamic would be as fast as groovy++ in the end. I think it would be still a bit slower, but not very much…. it depends on the case.
The problem is that for example with EMC there are many cases that don’t fit fully in the way invokedynamic works. That is why we intend to base Groovy2 full and 100% support of every feature on invokedynamic logic. So then everything will be available to invokedynamic and then hopefully we are quite fast.”
Cheers,
Merlyn