stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "mark.g.brown" <mark.g.br...@gmail.com>
Subject [PATCH] for STDCXX-491 - string::push_back() slow
Date Sun, 22 Jul 2007 22:05:51 GMT
Hi all,

The attached simple patch speeds up push_back() nearly six times
relative to stdcxx 4.1.3 and makes it more than twice faster that
gcc's.

$ time ./push_back-stdcxx-patched 500000000

real    0m2.800s
user    0m1.676s
sys     0m1.084s

$ time ./push_back-stdcxx-4.1.3 500000000

real    0m11.206s
user    0m10.017s
sys     0m1.184s

$ time ./push_back-gcc 500000000

real    0m4.555s
user    0m3.840s
sys     0m0.716s


--Mark

Mime
View raw message