Patrick Wright wrote:
[...]
I'm not sure I'm clear on the ownership of the metadata. If Thread-A
modifies the metadata, must this be "immediately" visible to Thread-B
(and C and D...)?

no. I could even imagine having the user do something special to make it visible. So neither "immediately" nor "automatic" is not an absolute requirement for me.

[...]
If the given metadata is considered fixed/static for the execution of
a thread, and you don't want the cost of a thread local, then you
could probably weave it into the stack as a (to the user, hidden)
method parameter, no? Then you would avoid the indirection of the
thread local lookup.

In Groovy you constantly cross from Groovy domain into Java domain and back. Groovy is not a layer on top of Java, it sits more side by side. As such I of course loose this bonus as soon as I have to call a Java method or as soon as Java calls a Groovy method. This would certainly be good enough to fool some benchmarks, but I will have to generate a lot of additional methods (the way with the additional parameter). Actually I was going to say this cannot work, but now, that I think about it again, maybe the penalties are not as big as I think - and Groovy to Groovy method calling would be quite fast then. It is still not the maximum possible speed of course.

bye Jochen

--
Jochen "blackdrag" Theodorou
The Groovy Project Tech Lead (http://groovy.codehaus.org)
http://blackdragsview.blogspot.com/

--
You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en.

Reply via email to