3 Comments

Great stuff. I didn't know about the likely / __builtin_expect() gcc hint. I see how apt the publication name, Delayed Branch is.

If the cpu encounters branchyFunction() more than a few times (> 1? > 2,3 or 4?) can its branch predictor essentially do the same optimization when it sees that cmp %rax, 0 instruction at that location next time?

Expand full comment