This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[v3] Minor tweaks to 2 performance tests
- From: Paolo Carlini <pcarlini at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 16 Dec 2003 14:28:14 +0100
- Subject: [v3] Minor tweaks to 2 performance tests
Hi,
tested x86-linux.
Paolo.
/////////////
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.
diff -urN libstdc++-v3-orig/testsuite/performance/narrow_widen_char.cc libstdc++-v3/testsuite/performance/narrow_widen_char.cc
--- libstdc++-v3-orig/testsuite/performance/narrow_widen_char.cc 2003-12-16 11:03:47.000000000 +0100
+++ libstdc++-v3/testsuite/performance/narrow_widen_char.cc 2003-12-16 14:21:04.000000000 +0100
@@ -35,7 +35,6 @@
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 @@
// 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);
diff -urN libstdc++-v3-orig/testsuite/performance/narrow_widen_wchar_t.cc libstdc++-v3/testsuite/performance/narrow_widen_wchar_t.cc
--- libstdc++-v3-orig/testsuite/performance/narrow_widen_wchar_t.cc 2003-12-16 10:59:35.000000000 +0100
+++ libstdc++-v3/testsuite/performance/narrow_widen_wchar_t.cc 2003-12-16 14:11:17.000000000 +0100
@@ -63,6 +63,7 @@
ct.widen(i % 128);
stop_counters(time, resource);
report_performance(__FILE__, "widen", time, resource);
+ clear_counters(time, resource);
// widen array
start_counters(time, resource);