3 ms·
Is this a 5% to 50% performance hit on all workloads or specific workloads?
by ikeyany 9y ago
Is this a 5% to 50% performance hit on all workloads or specific workloads?
- TheCycoONE 9y agoThe 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.
- nikanj 9y agoI wonder where that leaves Java, C#, Node.js etc. Do the VMs generate code that suffers from this?
- DannyBee 9y agoyes
- Matthias247 9y agoHmm, 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.