[Bug libstdc++/20706] string::reserve severe performance regression

2005-03-31 Thread pcarlini at suse dot de
--- Additional Comments From pcarlini at suse dot de 2005-03-31 21:14 --- I should also add, that, in general, your snippet could be simpler, without penalizing the performance: typically reserve is only called once, at the outset, if we can estimate in advance the final size of the str

[Bug libstdc++/20706] string::reserve severe performance regression

2005-03-31 Thread pcarlini at suse dot de
--- Additional Comments From pcarlini at suse dot de 2005-03-31 20:56 --- This is not a bug, it's the intended, standard conforming, behavior. This is happening because, when you call dest.reserve(dest.length() + 1) the string class is actually *shrinking* the capacity of the string, wh