mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-30 07:14:09 +08:00
narrow_widen_char.cc: Tweak the number of iterations for each test.
2003-12-16 Paolo Carlini <pcarlini@suse.de> * testsuite/performance/narrow_widen_char.cc: Tweak the number of iterations for each test. * testsuite/performance/narrow_widen_wchar_t.cc: Add a missing clear_counters. From-SVN: r74692
This commit is contained in:
parent
a268eff9ce
commit
b1660ae9ea
@ -1,3 +1,10 @@
|
||||
2003-12-16 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
* testsuite/performance/narrow_widen_char.cc: Tweak the
|
||||
number of iterations for each test.
|
||||
* testsuite/performance/narrow_widen_wchar_t.cc: Add a
|
||||
missing clear_counters.
|
||||
|
||||
2003-12-16 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
PR libstdc++/11723
|
||||
|
@ -35,7 +35,6 @@ int main()
|
||||
|
||||
time_counter time;
|
||||
resource_counter resource;
|
||||
const long iters = 200000000;
|
||||
char bufin[] = "This was an attempt to bypass string construction just for test.";
|
||||
char bufout[sizeof(bufin)];
|
||||
|
||||
@ -60,14 +59,15 @@ int main()
|
||||
|
||||
// widen
|
||||
start_counters(time, resource);
|
||||
for (long i = 0; i < iters; ++i)
|
||||
for (long i = 0; i < 1000000000; ++i)
|
||||
ct.widen(i % 128);
|
||||
stop_counters(time, resource);
|
||||
report_performance(__FILE__, "widen", time, resource);
|
||||
clear_counters(time, resource);
|
||||
|
||||
// widen array
|
||||
start_counters(time, resource);
|
||||
for (long i = 0; i < iters; ++i)
|
||||
for (long i = 0; i < 100000000; ++i)
|
||||
ct.widen(bufin, bufin+sizeof(bufin), bufout);
|
||||
stop_counters(time, resource);
|
||||
report_performance(__FILE__, "widen_array", time, resource);
|
||||
|
@ -63,6 +63,7 @@ int main()
|
||||
ct.widen(i % 128);
|
||||
stop_counters(time, resource);
|
||||
report_performance(__FILE__, "widen", time, resource);
|
||||
clear_counters(time, resource);
|
||||
|
||||
// widen array
|
||||
start_counters(time, resource);
|
||||
|
Loading…
Reference in New Issue
Block a user