vcall wish for hotspot

Andy Nuss andrew_nuss at yahoo.com
Sat May 18 17:18:32 PDT 2013


Ok guys.  I'll try to get setup with github, and provide both cases for you with latest C++ and latest jdk7, or redact my claim.

By the way, there are no branches, as you will see from my benchmark.



________________________________
 From: Clemens Eisserer <linuxhippy at gmail.com>
To: Andy Nuss <andrew_nuss at yahoo.com>; hotspot-dev at openjdk.java.net 
Sent: Saturday, May 18, 2013 4:22 PM
Subject: Re: vcall wish for hotspot
 

Hi Andy,

>> I do know that C++ compilers can emit much much faster vcalls,
>> especially when the class is not involving multiple inheritance.
> As to how much faster c++ is, I haven't coded in C++ at all in 5 years, and
> then it was on a much slower laptop, so I'm not set up to benchmark it.

You have not benchmarked it, yet claim to "know" C++ compilers emot
"much much" faster code for this case?


> Then in two identical warmed up loop functions of 10 billion iterations,
> one the iterates and returns the sum of Link get() and one that returns the sum of Link3 get(),
> compare the time to execute both.
> The difference is about .5 nanos per iteration on my machine.

The difference you see with your benchmark is not only the pure
overhead of bimorphic call logic, but far more important, branch
misprediction caused by the alternating branch targets.

- Clemens
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20130518/64ec7971/attachment.html 


More information about the hotspot-compiler-dev mailing list