[llvm-commits] [test-suite] r40873 - /test-suite/trunk/SingleSource/Benchmarks/Shootout-C++/strcat.cpp
Lauro Ramos Venancio
lauro.venancio at gmail.com
Mon Aug 6 13:57:46 PDT 2007
Author: laurov
Date: Mon Aug 6 15:57:46 2007
New Revision: 40873
URL: http://llvm.org/viewvc/llvm-project?rev=40873&view=rev
Log:
SMALL_PROBLEM_SIZE: reduce the memory usage.
Modified:
test-suite/trunk/SingleSource/Benchmarks/Shootout-C++/strcat.cpp
Modified: test-suite/trunk/SingleSource/Benchmarks/Shootout-C++/strcat.cpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Shootout-C%2B%2B/strcat.cpp?rev=40873&r1=40872&r2=40873&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Shootout-C++/strcat.cpp (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Shootout-C++/strcat.cpp Mon Aug 6 15:57:46 2007
@@ -9,7 +9,12 @@
int main(int argc, char *argv[])
{
- int i, n = ((argc == 2) ? atoi(argv[1]) : 5000000);
+#ifdef SMALL_PROBLEM_SIZE
+#define LENGTH 1000000
+#else
+#define LENGTH 5000000
+#endif
+ int i, n = ((argc == 2) ? atoi(argv[1]) : LENGTH);
string str;
size_t capacity = 31;
str.reserve(capacity); // as per C-string
More information about the llvm-commits
mailing list