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:Guillaume Laforge (glaf@gmail.com)
Date:Feb 23, 2008 12:28:20 am
List:org.codehaus.groovy.dev

On Sat, Feb 23, 2008 at 8:43 AM, Charles Oliver Nutter <char@sun.com> wrote:

Excellent summary of the problems with this proposal. I have some comments below.

Agreed, that was an excellent summary. In fact, I didn't think the consequences whould have gone that deep, but with these explanations, it's pretty clear. Thanks a lot, Jochen.

Jochen Theodorou wrote:

Groovy has atm dynamic typing. Any change with a fast mode goals a more or less static system, which is a major change for such a language. There is either version 2, which will mean you can not mix dynamic typed parts and static typed parts in the same area and there is version 3 which allows that, but will also give not many hints when it will do static and when it will do dynamic typing.

This is exactly what worried me. Because static typing goes through an entirely different mechanism, it would be both confusing and problematic for users. This is further complicated by the many users that would try to take their Groovy code and "make it faster" by adding static types. Suddenly dispatch rules would be completely different, and the code would break.

Also, on a practical note, I hardly imagine the headaches when doing user support on the mailing-lists, trying to figure out which call is really static, which one is really dynamic, switching mental models back and forth to figure out what's going on.

Some argue, that they would like to use Groovy, because it has a better syntax... for example with closures. Let us forget a moment about the GDK methods. Let us first look at a usage of Closures:

My opinion here is that it sounds like many people want Groovy features in Java for certain pieces of code. I think that's a great idea...if these features have proven useful we should consider adding them to Java or consider making a static-typed Java-like language that supports them if we can't push through actual Java language changes. Heck, even the javac compiler toolchain is open-source now, so we could build off that.

In a way, I believe C# has shown the way so far (especially the third revision of it), by adding extension methods (our Groovy categories more or less), anonymous functions (kinda like our closures), aonymous types (a bit like our habit to return lists and maps in our Groovy algorithms).

Java is evolving more slowly, unfortunately, but I hope it'll get some of the goodness of Groovy in it, over time. And as Charles says, if we find an 8th day in our weeks, it could be fun prototyping this with OpenJDK or the multilanguage JVM work.

But don't try to turn Groovy into "Java with extras" just because it might solve a few performance problems. It wouldn't be Groovy.

No comment, I can't agree more :-)

The way we want to go is to find a fast method selection process, where the selection will be cached at the place where the method call will be done (call site cache) and in later calls we will need only a verification step here, which can be much faster than the normal method selection and which probably can be inlined by the JIT together with the method call itself. This will mean that.

This is the technique that has been proven to work in JRuby, and it would work for Groovy too. I'm willing to help make it happen (once I find my misplaced 8th day of the week).

You know, all your messages on these topics have already been of great help and insight -- as well as those of John Wilson -- and we all appreciate your efforts to help us. Being busy on JRuby, I'd understand you can't find time to give us a hand, don't worry, but if you do, that's cool :-)

Thanks Charlie for your comments.

-- 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