[v3] libstdc++/16612

Paolo Carlini pcarlini@suse.de
Fri Sep 24 22:51:00 GMT 2004


Paolo Carlini wrote:

> Having a conditional for the most fundamental operation, that is
> character access, doesn't seem a price that can be paid in order to
> easily support shared memory.

For concreteness, a *very* rough test on my P4-2400 (much more to
come but most not before the beginning of next week, sorry):

#include <string>

int main()
{
  std::string src(50000, 'a');
  std::string dst(50000, 'b');

  for (int i = 0; i < 50000; ++i)
    for (int j = 0; j < 50000; ++j)
      dst[j] = src[i];
}

mainline
--------
6.610u 0.000s 0:06.62 99.8%     0+0k 0+0io 165pf+0w

mainline + patch
----------------
13.340u 0.000s 0:13.38 99.7%    0+0k 0+0io 165pf+0w

icc8
----
8.760u 0.000s 0:08.80 99.5%     0+0k 0+0io 186pf+0w

Paolo.



More information about the Libstdc++ mailing list