[v3] conditional tweak
Martin Sebor
sebor@roguewave.com
Fri Nov 7 21:52:00 GMT 2003
Gabriel Dos Reis wrote:
...
> | While I haven't measured Jerry's particular patch, on machines with deep
> | pipelines, an incorrectly-predicted branch can be a significant stall
> | (most/all of the pipeline has to be cleared).
>
> In theory, yes. In this particular case, we're speaking of an I/O
> formatting flag setting which is nowhere a bottleneck (expect probably
> in a testsuite).
This conditional actually does happen to have a significant impact
on performance -- fill() is called every time a number is inserted
into a stream, for example.
Incidentally, I recently profiled the effect of the HP aCC $pragma
ESTIMATED_FREQUENCY (the rough equivalent of gcc's __builtin_expect)
on IPF (i.e., IA64). IIRC, the improvement was between 5 and 10% for
a small block of code.
Martin
More information about the Libstdc++
mailing list