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]

Re: [RFC] libstdc++ atomicity, x86 agnostic version


Using Jakub's test:

#include <string>

using namespace std;

bool b = true;
const string s = "abc";

void foo(string &x)
{ }

int main (void)
{
  for (int i = 0; i < 10000000; ++i)
    {
      string t = s;
      foo(t);
    }
}


I get:

%time ./gcc-3.4-atomic.exe
1.740u 0.000s 0:01.79 97.2%     0+0k 0+0io 166pf+0w
1.750u 0.000s 0:01.76 99.4%     0+0k 0+0io 166pf+0w
<bkoz@roscoe> /home/bkoz/string_tests 
%time ./gcc-3.4.exe
1.560u 0.010s 0:01.59 98.7%     0+0k 0+0io 165pf+0w
1.580u 0.000s 0:01.59 99.3%     0+0k 0+0io 165pf+0w
<bkoz@roscoe> /home/bkoz/string_tests 
%time ./gcc-3.3.2.exe
1.660u 0.000s 0:01.67 99.4%     0+0k 0+0io 203pf+0w
1.650u 0.000s 0:01.66 99.3%     0+0k 0+0io 203pf+0w

-benjamin


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