3 ms·
Is the Branch Target Buffer synonymous with the instruction cache[1]? But yes, it certainly can matter. I thought the links that 'wendroid' offered above were
by nkurz 16y ago
Is the Branch Target Buffer synonymous with the instruction cache[1]? But yes, it certainly can matter. I thought the links that 'wendroid' offered above were interesting: a Scheme interpreter, presumably already fairly well optimized, saw about a 10% improvement through the hinting macros.
But I'd argue that if this level of optimization is required, the bigger gains are to be see through changing your algorithms to become more regular: for example, using fixed length blocks in a compression scheme rather than checking for null termination [2]. But if this is for some reason impossible, then use hinting!
[1] http://www.agner.org/optimize/microarchitecture.pdf http://www.agner.org/optimize/microarchitecture.pdf
[2] http://www2008.org/papers/pdf/p387-zhangA.pdf http://www2008.org/papers/pdf/p387-zhangA.pdf
- prodigal_erik 16y agoThanks, I didn't know that branch predictions are now cached separately from instruction decodings. Hopefully evictions are a rarer problem.