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:
Paolo Carlini 2003-12-16 13:25:23 +00:00 committed by Paolo Carlini
parent a268eff9ce
commit b1660ae9ea
3 changed files with 11 additions and 3 deletions

View File

@ -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

View File

@ -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);

View File

@ -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);