62 messages in org.codehaus.groovy.devRe: [groovy-dev] Groovy performance: ...
FromSent OnAttachments
Alex TkachmanFeb 19, 2008 2:09 am 
Steven DevijverFeb 19, 2008 2:37 am 
Alexandru Popescu ☀Feb 19, 2008 2:57 am 
Alex TkachmanFeb 19, 2008 3:03 am 
Patric BechtelFeb 19, 2008 3:12 am 
Guillaume LaforgeFeb 19, 2008 3:25 am 
Guillaume LaforgeFeb 19, 2008 3:26 am 
Patric BechtelFeb 19, 2008 5:05 am 
Gavin GroverFeb 19, 2008 5:51 am 
Steven DevijverFeb 19, 2008 5:52 am 
Guillaume LaforgeFeb 19, 2008 5:54 am 
Tom NicholsFeb 19, 2008 6:26 am 
Alex TkachmanFeb 19, 2008 6:28 am 
Guillaume LaforgeFeb 19, 2008 6:35 am 
Tom NicholsFeb 19, 2008 7:03 am 
Guillaume LaforgeFeb 19, 2008 7:38 am 
Chanwit KaewkasiFeb 19, 2008 7:52 am 
Charles Oliver NutterFeb 19, 2008 8:49 am 
Steven DevijverFeb 19, 2008 10:03 am 
Charles Oliver NutterFeb 19, 2008 11:38 am 
Steven DevijverFeb 19, 2008 12:11 pm 
Alex TkachmanFeb 19, 2008 12:39 pm 
Alex TkachmanFeb 19, 2008 12:48 pm 
tugwilsonFeb 19, 2008 1:36 pm 
Alex TkachmanFeb 19, 2008 8:51 pm 
Guillaume LaforgeFeb 20, 2008 2:10 am 
Jochen TheodorouFeb 20, 2008 9:46 am 
Martin C. MartinFeb 20, 2008 5:25 pm 
Guillaume LaforgeFeb 21, 2008 1:35 am 
Tom NicholsFeb 21, 2008 4:15 am 
Martin C. MartinFeb 21, 2008 5:44 am 
Tom NicholsFeb 21, 2008 6:22 am 
Smith, Jason, CTR, OASD(HA)/TMAFeb 21, 2008 6:34 am 
Martin C. MartinFeb 21, 2008 6:43 am 
Guillaume LaforgeFeb 21, 2008 6:48 am 
Guillaume LaforgeFeb 21, 2008 7:04 am 
Smith, Jason, CTR, OASD(HA)/TMAFeb 21, 2008 7:18 am 
Charles Oliver NutterFeb 21, 2008 7:38 am 
Guillaume LaforgeFeb 21, 2008 7:42 am 
Martin C. MartinFeb 21, 2008 8:36 am 
Martin C. MartinFeb 21, 2008 8:48 am 
Pascal DeMillyFeb 21, 2008 5:35 pm 
Gavin GroverFeb 21, 2008 6:21 pm 
Jochen TheodorouFeb 22, 2008 4:31 am 
Tom NicholsFeb 22, 2008 4:49 am 
Charles Oliver NutterFeb 22, 2008 11:43 pm 
Guillaume LaforgeFeb 23, 2008 12:28 am 
Martin C. MartinFeb 23, 2008 3:51 am 
Jochen TheodorouFeb 23, 2008 2:49 pm 
Jochen TheodorouFeb 23, 2008 2:53 pm 
Charles Oliver NutterFeb 24, 2008 2:01 am 
Martin C. MartinFeb 24, 2008 3:56 am 
Martin C. MartinFeb 24, 2008 4:11 am 
Charles Oliver NutterFeb 24, 2008 5:12 am 
Jochen TheodorouFeb 24, 2008 3:17 pm 
Jochen TheodorouFeb 24, 2008 3:31 pm 
Alexandru Popescu ☀Feb 24, 2008 3:36 pm 
Martin C. MartinFeb 26, 2008 2:20 pm 
Martin C. MartinFeb 26, 2008 3:15 pm 
Jochen TheodorouFeb 27, 2008 2:38 am 
Jochen TheodorouFeb 27, 2008 3:03 am 
Martin C. MartinMar 2, 2008 5:21 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [groovy-dev] Groovy performance: what to doActions...
From:Martin C. Martin (mar@martincmartin.com)
Date:Feb 21, 2008 8:48:32 am
List:org.codehaus.groovy.dev

Hi Tom,

Tom Nichols wrote:

On Thu, Feb 21, 2008 at 4:35 AM, Guillaume Laforge <glaf@gmail.com> wrote:

It's not a problem of annotation vs keyword. It's the concept which is not the right thing to do. It's about making the whole Groovy language faster in all possible scenarios, not just through one hack to speed-up one or two methods, which will never be as fast as Java anyway. Let's make everything at least as fast as this hack.

I think the "pro static annotation" people are basing their argument on the assumption that "pure" dynamic Groovy will never be able to attain the same performance of a non-dynamic-annotated variant. If re-architecting Groovy's MOP will allow it to attain ~half of Java's speed, then fine, that's great, go there.

That's a good summary. This thread started because Alex needed 4 attempts to rewrite the call site optimization to "avoid some very tricky bugs with EMC and categories on multi-threading." I suspect that getting within a factor of 2 of Java's speed is very tricky while still maintaining full dynamics. Guillaume is talking about being the fastest *dynamic* language on the JVM, being faster than Jython or JRuby, and being within a factor of 10 of Java.

If it turns out there's a MOP that can be practically implemented that gets within a factor of 2 of Java's speed, then there's no need for the annotation/keyword. But these things are often very very hard to get right, or even impossible beyond the simplest cases.

But I agree with Martin's argument that most people will ignore such an annotation until it comes time to do performance tuning anyway. Then sprinkle a few annotations in the performance bottlenecks, versus (the current solution) breaking some code out into Java classes. Like I said, I would prefer the former, but if it truly won't be necessary after "Groovy 2.0" then it is a moot point.

As annotations go, aren't they modular in the sense that you can add hooks into places without them actually being hard-coded into the compiler? Maybe the groovy compiler doesn't support it now, but doesn't the Java (5 or 6) compiler? Would it be possible to allow this compile-time annotation without "invading" core Groovy?

The compiler would need to change the code that's generated, in a way that would change the semantics. Of course, the idea is to use it where the new semantics would be the same as the old semantics, but in Alex's proposal it's up to the programmer to ensure that.

--------------------------------------------------------------------- To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email