[llvm-commits] [test-suite] r107083 - in /test-suite/trunk/SingleSource/Benchmarks/Adobe-C++: functionobjects.cpp loop_unroll.cpp simple_types_constant_folding.cpp simple_types_loop_invariant.cpp stepanov_abstraction.cpp stepanov_vector.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Mon Jun 28 15:10:04 PDT 2010
Author: stoklund
Date: Mon Jun 28 17:10:04 2010
New Revision: 107083
URL: http://llvm.org/viewvc/llvm-project?rev=107083&view=rev
Log:
Speed up benchmarks for SMALL_PROBLEM_SIZE.
Some of these C++ benchmarks suffer significantly under -O0, so some have been
scaled by a factor 100. The aim is approx 1s runtime for X86 -O0.
Modified:
test-suite/trunk/SingleSource/Benchmarks/Adobe-C++/functionobjects.cpp
test-suite/trunk/SingleSource/Benchmarks/Adobe-C++/loop_unroll.cpp
test-suite/trunk/SingleSource/Benchmarks/Adobe-C++/simple_types_constant_folding.cpp
test-suite/trunk/SingleSource/Benchmarks/Adobe-C++/simple_types_loop_invariant.cpp
test-suite/trunk/SingleSource/Benchmarks/Adobe-C++/stepanov_abstraction.cpp
test-suite/trunk/SingleSource/Benchmarks/Adobe-C++/stepanov_vector.cpp
Modified: test-suite/trunk/SingleSource/Benchmarks/Adobe-C++/functionobjects.cpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Adobe-C%2B%2B/functionobjects.cpp?rev=107083&r1=107082&r2=107083&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Adobe-C++/functionobjects.cpp (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Adobe-C++/functionobjects.cpp Mon Jun 28 17:10:04 2010
@@ -247,7 +247,11 @@
int main(int argc, char* argv[])
{
int i;
+#ifdef SMALL_PROBLEM_SIZE
+ int iterations = (1 < argc) ? atoi(argv[1]) : 30; // number of iterations
+#else
int iterations = (1 < argc) ? atoi(argv[1]) : 300; // number of iterations
+#endif
int tablesize = (2 < argc) ? atoi(argv[2]) : 10000; // size of array
Modified: test-suite/trunk/SingleSource/Benchmarks/Adobe-C++/loop_unroll.cpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Adobe-C%2B%2B/loop_unroll.cpp?rev=107083&r1=107082&r2=107083&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Adobe-C++/loop_unroll.cpp (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Adobe-C++/loop_unroll.cpp Mon Jun 28 17:10:04 2010
@@ -39,7 +39,11 @@
// this constant may need to be adjusted to give reasonable minimum times
// For best results, times should be about 1.0 seconds for the minimum test run
+#ifdef SMALL_PROBLEM_SIZE
+int iterations = 50;
+#else
int iterations = 1000;
+#endif
// 8000 items, or between 8k and 64k of data
// this is intended to remain within the L2 cache of most common CPUs
Modified: test-suite/trunk/SingleSource/Benchmarks/Adobe-C++/simple_types_constant_folding.cpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Adobe-C%2B%2B/simple_types_constant_folding.cpp?rev=107083&r1=107082&r2=107083&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Adobe-C++/simple_types_constant_folding.cpp (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Adobe-C++/simple_types_constant_folding.cpp Mon Jun 28 17:10:04 2010
@@ -57,7 +57,11 @@
// this constant may need to be adjusted to give reasonable minimum times
// For best results, times should be about 1.0 seconds for the minimum test run
+#ifdef SMALL_PROBLEM_SIZE
+int base_iterations = 100;
+#else
int base_iterations = 5000;
+#endif
int iterations = base_iterations;
Modified: test-suite/trunk/SingleSource/Benchmarks/Adobe-C++/simple_types_loop_invariant.cpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Adobe-C%2B%2B/simple_types_loop_invariant.cpp?rev=107083&r1=107082&r2=107083&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Adobe-C++/simple_types_loop_invariant.cpp (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Adobe-C++/simple_types_loop_invariant.cpp Mon Jun 28 17:10:04 2010
@@ -32,8 +32,11 @@
// this constant may need to be adjusted to give reasonable minimum times
// For best results, times should be about 1.0 seconds for the minimum test run
+#ifdef SMALL_PROBLEM_SIZE
+int iterations = 50;
+#else
int iterations = 1000;
-
+#endif
// 8000 items, or between 8k and 64k of data
// this is intended to remain within the L2 cache of most common CPUs
Modified: test-suite/trunk/SingleSource/Benchmarks/Adobe-C++/stepanov_abstraction.cpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Adobe-C%2B%2B/stepanov_abstraction.cpp?rev=107083&r1=107082&r2=107083&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Adobe-C++/stepanov_abstraction.cpp (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Adobe-C++/stepanov_abstraction.cpp Mon Jun 28 17:10:04 2010
@@ -166,7 +166,7 @@
// this constant may need to be adjusted to give reasonable minimum times
// For best results, times should be about 1.0 seconds for the minimum test run
#ifdef SMALL_PROBLEM_SIZE
-int iterations = 10000;
+int iterations = 100;
#else
int iterations = 200000;
#endif
Modified: test-suite/trunk/SingleSource/Benchmarks/Adobe-C++/stepanov_vector.cpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Adobe-C%2B%2B/stepanov_vector.cpp?rev=107083&r1=107082&r2=107083&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Adobe-C++/stepanov_vector.cpp (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Adobe-C++/stepanov_vector.cpp Mon Jun 28 17:10:04 2010
@@ -36,7 +36,11 @@
// this constant may need to be adjusted to give reasonable minimum times
// For best results, times should be about 1.0 seconds for the minimum test run
+#ifdef SMALL_PROBLEM_SIZE
+int iterations = 600;
+#else
int iterations = 60000;
+#endif
// 2000 items, or about 16k of data
// this is intended to remain within the L2 cache of most common CPUs
More information about the llvm-commits
mailing list