4 ms·
> seem to be about 25% faster So if you tested sometime between Haswell and Skylake, there was a period when there was no noticeable difference in cgoto vs a s
by gopalv 6y ago
> seem to be about 25% faster
So if you tested sometime between Haswell and Skylake, there was a period when there was no noticeable difference in cgoto vs a switch dispatch[1].
Then Intel got caught up in Meltdown, which is how it was speculating through branches and we're back to 2010 speeds for the switch dispatch, because the branch prediction won't load up the cache (the instruction cache) or start decoding before the conditional is entirely processed.
[1] - https://news.ycombinator.com/item?id=15397109 https://news.ycombinator.com/item?id=15397109
- monocasa 6y agoWe'll probably get the speed up parity back once there's a proper speculative execution barrier instruction added to the ISA (though not for currently released chips).
- jonstewart 6y agoLink about Meltdown mitigations? I’ve been operating off idea that computed goto isn’t faster anymore due to better branch prediction, would love to see something in-depth to the contrary.