On 24.08.2016 22:33, Winnebeck, Jason wrote:
You mentioned the PIC limitation of 1 in Groovy, suggesting that monomorphic 
call sites are efficient in dynamic Groovy, but not polymorphic or megamorphic 
ones. Is the call site considered polymorphic or monomorphic if the method 
called is via a common interface?

void rot90(Shape s) {
   s.rotate(90)
}

for (Shape s in (large list of squares, triangles, circles, etc.)) {
   rot90(s)
}

that is not monomorphic in Groovy.

You mentioned that indy takes more setup for call site caching, does that imply 
that an application relying on a large number of poly/megamorphic call sites is 
better served by the pre-indy method?

in tight loops with current Groovy, yes. This holds, till we change things

bye Jochen

Reply via email to