Commit b1660ae9 by Paolo Carlini Committed by Paolo Carlini

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
parent a268eff9
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
* include/bits/locale_facets.h: Add _M_bit and _M_wmask,
used to speed up the computation of ctype::do_is.
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment