A simple benchmark
Paolo Carlini
pcarlini@unitus.it
Fri Mar 29 09:21:00 GMT 2002
Hi,
the impact on append/assign/insert/replace members having the source
data specified in terms of iterators of the replace specializations
should be quite obvious at this point, but, nevertheless, this is what
is obtained on my PII-400 (-O2) for a simple append test:
#include <string>
int main()
{
std::string dest;
std::string source = "data";
for (int i = 0; i < 10000000; ++i)
dest.append(source.begin(), source.end());
}
Current mainline:
-----------------
9.240u 0.520s 0:10.07 96.9% 0+0k 0+0io 219pf+0w
Current mainline + specializations patch
----------------------------------------
4.380u 0.550s 0:05.09 96.8% 0+0k 0+0io 218pf+0w
Ciao,
Paolo.
More information about the Libstdc++
mailing list