[Patch] Batch of basic_string correctness and performance work

Paolo Carlini pcarlini@suse.de
Tue Oct 26 20:57:00 GMT 2004


Gawain Bolton wrote:

> Yes this is exactly the type of code I'm against inlining.  It 
> contains 2 tests which will never benefit from branch prediction, 
> which for modern CPUs is a major handicap.

Frankly, Gawain, I don't like too much your stance. If you don't 
consider candidates for inlining functions like the current push_back 
(which must be executed once for each char and is definitely performance 
critical) then probably you disagree also with the basic design 
principle of basic_streambuf. Empirically, all my tests provide evidence 
in favor of that, not only on x86, even more on "saner" architectures 
like x86_64. Since it looks like you have very clear ideas about the way 
to go, please test thoroughly my inline -> out-of-line patch of 
yesterday, and we'll trust you when you will report the outcome of your 
results.

On many points your message is misleading, doesn't take into account 
history, past empirical evidence, and so on, sorry I don't find very 
productive replying to each one.

Paolo.



More information about the Libstdc++ mailing list