Thunks, vol. XXII

Christophe de Dinechin ddd at cup.hp.com
Wed Sep 1 20:47:08 UTC 1999


> If branching is really that expensive, such accumulation of adjustment 
> might be cheaper, no?

Mmmh, it looks like I was quite misleading.

Branching in itself is not that expensive. It is supposed to be  
quite cheap, in particular for unconditional branches. The major  
problem with "branch islands" is that they put an unnecessary burden  
on the I-cache, which is quite small, and a cache miss penalty is  
really high.

Regarding the branch cost itself, I'm confused. There seem to be a  
slight contradiction between the documentation I have, which seems to  
imply (albeit not that clearly) that a branch in a bundle following  
a mispredicted branch is correctly predicted, and a simulation I made  
a while ago for shared library performance testing, which showed  
that an indirect branch to a bundle containing a direct branch cost,  
overall, significantly more than an indirect branch to a pair of  
bundles, the first one doing some operation and the second one  
branching.


Regards
Christophe




More information about the cxx-abi-dev mailing list