megamorphic lambda prevention

Jochen Theodorou blackdrag at gmx.org
Thu Jun 21 03:37:20 PDT 2012


Hi all,

I was wondering... if I have code like this:

list.each { x -> foo(x) }
list.each { x -> bar(x) }
list.each { x -> something(x) }

then isn't it the a case where within the each method we easily get 
something megamorphic, since there are too many different kinds of 
lambdas involved? Isn't that a general problem with internal iterators 
and is there any plan to enhance hotspot to counter that problem?

bye Jochen

-- 
Jochen "blackdrag" Theodorou - Groovy Project Tech Lead
blog: http://blackdragsview.blogspot.com/
german groovy discussion newsgroup: de.comp.lang.misc
For Groovy programming sources visit http://groovy-lang.org



More information about the mlvm-dev mailing list