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] |
Using Jakub's test:Well, it looks like part of the test is bogus (sorry Jakub!) since the argument x of foo is a reference and therefore no constructions and destructions take place...
#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:I see. Seems something reasonable for 3.4...
%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
Thanks, Paolo.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |