Hacker News new | ask | show | jobs
by ikeyany 3084 days ago
Is this a 5% to 50% performance hit on all workloads or specific workloads?
1 comments

The 50% was for a microbenchmark of C++ code making heavy use of virtual. V-tables and jump tables get much more expensive. Any execution path that is known at compile time is not affected.
I wonder where that leaves Java, C#, Node.js etc. Do the VMs generate code that suffers from this?
Hmm, interesting question. On the hand JITs do devirtualization, so that on lots of code paths the indirect calls are replaced with direct ones. Which should mitigate the performance issues. However I think the JITs also need to insert the logic and branches for re-jitting and spectreulative execution. These might be additional indirect calls.

Would be interesting how it balances out in total.

yes