This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
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