I didn’t get that when I saw it. It’s a pretty major statement to make without anything behind it. The blog post references a video interview of Guillaume at devoxx, and I thought I only heard him say that the static compilation mode just makes it “as fast as Java” (which seems to be approximately true, except that the static mode I think still injects some Groovy-specific code normally not found in Java). But, the weekly post is on Guillaume’s blog so why would he mis-quote himself?
If it is true that Groovy is faster than Java anywhere I would be very interested in seeing these results or benchmarks as well.
Diverging only slightly, I don’t see how Groovy can beat Java in a general sense given that Groovy generates bytecode and Java and JVM are tuned to each other given Java is primary use case of bytecode and JVM, and also Groovy even in static compile mode can still do more work than Java (think like asType call for “casting”, and closures do have non-zero overhead compared to loop). However, I can see some potential wins against Java in the area of AST transformation where one could use AST transformation to do at compile time things one might do at Java runtime via reflection or aspects/proxies (example, commons-lang’s HashCodeBuilder using reflection versus EqualsAndHashCode AST), and for configuration which are compiled and run rather than “interpreting” XML or similar files.
Groovy now faster than Java on Android???! I want to shout this from the four corners of the earth! Are there benchmarks?
On Tue, Apr 28, 2015 at 12:23 AM, Guillaume Laforge <email@example.com> wrote:
Another Tuesday, another Groovy Weekly edition!
Please don't forget to subscribe to the new mailing-lists at Apache, as the user / dev ones at Codehaus will be decommissioned in about two weeks. Also note the new address of JIRA and Git.
This email message and any attachments are for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message and any attachments.