This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

A simple benchmark


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.





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]