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:Tom Nichols (tmni@gmail.com)
Date:Feb 19, 2008 7:03:16 am
List:org.codehaus.groovy.dev

On Feb 19, 2008 9:35 AM, Guillaume Laforge <glaf@gmail.com> wrote:

The problem with this approach is that it'd be like focusing on the short term and not the longer term, despite the facts that: - it's so easy to use Java when really needed

But it's easier _not_ to use Java, and breaking out pieces for performance reasons can quickly lead to bad encapsulation and OO design.

- it wouldn't be as fast as raw Java anyway

Of course not just as fast, but "close enough" for the sake of such a convenience.

- the code base would become littered with this annotation all over the place for no sane reason (remember the ugly @Property all over the place?)

Maybe _my_ codebase. But then that's what annotations are for. I don't consider it litter; it's metadata, used judiciously where necessary. And the current solution of "break out into Java where needed means my codebase from a file perspective is littered with Java files, so I have to keep switching to other files to see a complete picture of what is going on. I wouldn't ask such annotations to be put in the core Groovy libs. But let _me_ use them if I want to. Obviously @Property wasn't necessary because a sensible convention could be used instead. I don't think this is comparable and wouldn't be used nearly as often.

- having such quick wins in place wouldn't force us to think about a better underlying architecture, preventing Groovy from really scaling upward any day soon

Nobody is asking you not to make "dynamic Groovy" faster. The two aren't exclusive and nobody is saying "just do this and ignore the real issue." If it were a matter of manpower and this would take too much effort then fine, you have to concentrate on the long term. But it sounds like there are other people who want to do this.

I would say this is a valid point _if_ dynamic code could become as fast as the statically annotated equivalent. Because then the annotation would be obsolete. But I think even given all of the bytecode generation and callsite caching enhancements that have been discussed, this annotation would still give better performance, no? Give us both!

Thanks :) -Tom

On Tue, Feb 19, 2008 at 3:26 PM, Tom Nichols <tmni@gmail.com> wrote:

I like Alex's ideas. Yes, it does limit what Groovy can do in certain siturations but

1. it's optional, so the developer does this of his/her own volition, not due to any language constraints. 2. How invasive is this change? Is it really just a new annotation and some hooks in the compiler? Or does it require changes to the runtime too?

To me this seems like just another tool. It doesn't force Groovy in any direction. It just gives the developer more options. They can use it, or choose not to. Yes, it would cause some things to not work (i.e. libs that rely on runtime-dynamic stuff like GORM) but it would allow other situations to use Groovy's great syntax and some (most?) of its features without resorting to Java. Why not give the developer this tool (with the caveat that it is not a "magic speed-up button") and allow them to use it or not?

I think that if we can suddenly have ~90% of Java's speed with such a (seemingly) simple change, it would be well worth it. I would definitely prefer to write "static, annotated Groovy" versus Java.

-Tom

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

http://xircles.codehaus.org/manage_email

-- Guillaume Laforge Groovy Project Manager G2One, Inc. Vice-President Technology http://www.g2one.com

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

http://xircles.codehaus.org/manage_email

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

http://xircles.codehaus.org/manage_email