Re: Megamorphic virtual call optimization in Java

2022-02-05 Thread 'Gil Tene' via mechanical-sympathy
You might want to give it a spin on Prime (Zing) 11 and see what you get, the Falcon JIT in Prime will do polymorphic guarded in-line caching for up to 6 implementers by default, I believe (as is configurable to higher if needed). This is exactly the sort of thing that capability is meant for.

Re: Megamorphic virtual call optimization in Java

2022-02-05 Thread Remi Forax
> From: "r r" > To: "mechanical-sympathy" > Sent: Saturday, February 5, 2022 12:20:12 PM > Subject: Megamorphic virtual call optimization in Java > Hello, > we know that there are some techniques that make virtual calls not so > expensive > in JVM like Inline Cache or Polymorphic Inline Cache.

Re: Megamorphic virtual call optimization in Java

2022-02-05 Thread r r
JVM 11+ (OpenJDK / Zulu) sobota, 5 lutego 2022 o 12:30:38 UTC+1 gregor...@gmail.com napisaƂ(a): > which jvm? > > On Sat, Feb 5, 2022 at 6:26 AM r r wrote: > >> Hello, >> we know that there are some techniques that make virtual calls not so >> expensive in JVM like Inline Cache or Polymorphic

Re: Megamorphic virtual call optimization in Java

2022-02-05 Thread Greg Young
which jvm? On Sat, Feb 5, 2022 at 6:26 AM r r wrote: > Hello, > we know that there are some techniques that make virtual calls not so > expensive in JVM like Inline Cache or Polymorphic Inline Cache. > > Let's consider the following situation: > > Base is an interface. > > public void f(Base[]

Megamorphic virtual call optimization in Java

2022-02-05 Thread r r
Hello, we know that there are some techniques that make virtual calls not so expensive in JVM like Inline Cache or Polymorphic Inline Cache. Let's consider the following situation: Base is an interface. public void f(Base[] b) { for(int i = 0; i < b.length; i++) { b[i].m();