2 ms·
The testing function seems a little simple since branch density is a factor. I still love this reference: https://blog.cloudflare.com/branch-predictor/ https:
by themafia 7mo ago
The testing function seems a little simple since branch density is a factor. I still love this reference:
https://blog.cloudflare.com/branch-predictor/ https://blog.cloudflare.com/branch-predictor/
Should be titled: How I Learned to Stop Worrying and Love the Branch Predictor
- fc417fc802 7mo agoIt's odd. The section headers says "Density matters" but then the experiment shows that, actually, density does not matter. Only the total number of branches encountered across the linear piece of code. (In the chart "block size" is what determines density.) Also note in that chart what's being tested is unconditional jumps placed at unique addresses in a linear piece of code, not conditional jumps at the same address in a loop that fits entirely in L1i.