[Patch] Batch of basic_string correctness and performance work

Paolo Carlini pcarlini@suse.de
Mon Oct 25 22:59:00 GMT 2004


Paolo Carlini wrote:

> For instance, string_append.cc, that basically only uses basic_string, 
> is less than 0.5% bigger.

One last comment, to explain this 0.5%: before my patch *nothing* of 
those append was
inlined: nothing of append(const _CharT*, size_type) because it just 
called the heavy _M_mutate,
and nothing of append(const basic_string&) because was defined out of 
line. Therefore that 0.5%
easily accounts for the conditional and a bunch of assignments that now 
constitute "the bulk" of
those functions (+ reserve, still out of line).

Paolo.



More information about the Libstdc++ mailing list