vcall wish for hotspot
    Andy Nuss 
    andrew_nuss at yahoo.com
       
    Fri May 17 08:40:03 PDT 2013
    
    
  
Hi,
I profiled virtual calls on a very fast machine (core i7) after Aleksey pointing out some micro benchmark deficiencies in my benchmarking technique.  Corrected those.
Nailed down the time of a virtual call on core i7: with or without interfaces involved, if a bimorphic call is enforced on hotspot due to inability to inline, the overhead is very close to 0.5 nanos, whether the method is in the base class or in an interface.
Knowing nothing about java's evolving design for interfaces and generics, I do know that C++ compilers can emit much much faster vcalls, especially when the class is not involving multiple inheritance.
My wish:
That if Java knows that a class does not have interfaces, then theoretically, the bimorphic call thru the vtable of such a class should approach C++ speeds.
Is this wish ever achievable?
Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20130517/5bad1f1e/attachment.html 
    
    
More information about the hotspot-compiler-dev
mailing list