narrow_widen_char.cc: Tweak the number of iterations for each test.
authorPaolo Carlini <pcarlini@suse.de>
Tue, 16 Dec 2003 13:25:23 +0000 (13:25 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 16 Dec 2003 13:25:23 +0000 (13:25 +0000)
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

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/performance/narrow_widen_char.cc
libstdc++-v3/testsuite/performance/narrow_widen_wchar_t.cc

index 595922f46f8a6d374766e040cdc0f8d56cef4e76..21be5ec2e18d039df563ab486f6a7683f6f00ff9 100644 (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
index d6376b99bf6a4f28b4b593fd45ca9cba5a50afe4..f8b530dcfd044717d8daabcb570d95696978726b 100644 (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);
index da3e4f2115c602fe74eb0c940ac054326fd88855..f5d4536d0ac6e97591f920a568706d97d7f8b44e 100644 (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);