[llvm-commits] [test-suite] r111502 - in /test-suite/trunk: MultiSource/Benchmarks/MiBench/automotive-bitcount/automotive-bitcount.reference_output MultiSource/Benchmarks/MiBench/automotive-bitcount/bitcnts.c SingleSource/Benchmarks/BenchmarkGame/puzzle.c SingleSource/Benchmarks/BenchmarkGame/puzzle.reference_output
Daniel Dunbar
daniel at zuster.org
Wed Aug 18 18:29:16 PDT 2010
Author: ddunbar
Date: Wed Aug 18 20:29:16 2010
New Revision: 111502
URL: http://llvm.org/viewvc/llvm-project?rev=111502&view=rev
Log:
Use ?rand48 instead of rand(), for more predictable results.
Modified:
test-suite/trunk/MultiSource/Benchmarks/MiBench/automotive-bitcount/automotive-bitcount.reference_output
test-suite/trunk/MultiSource/Benchmarks/MiBench/automotive-bitcount/bitcnts.c
test-suite/trunk/SingleSource/Benchmarks/BenchmarkGame/puzzle.c
test-suite/trunk/SingleSource/Benchmarks/BenchmarkGame/puzzle.reference_output
Modified: test-suite/trunk/MultiSource/Benchmarks/MiBench/automotive-bitcount/automotive-bitcount.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/MiBench/automotive-bitcount/automotive-bitcount.reference_output?rev=111502&r1=111501&r2=111502&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/MiBench/automotive-bitcount/automotive-bitcount.reference_output (original)
+++ test-suite/trunk/MultiSource/Benchmarks/MiBench/automotive-bitcount/automotive-bitcount.reference_output Wed Aug 18 20:29:16 2010
@@ -1,10 +1,10 @@
Bit counter algorithm benchmark
-Optimized 1 bit/loop counter > Bits: 13254024
-Ratko's mystery algorithm > Bits: 15454236
-Recursive bit count by nybbles > Bits: 16468711
-Non-recursive bit count by nybbles > Bits: 18724896
-Non-recursive bit count by bytes (BW) > Bits: 15997399
-Non-recursive bit count by bytes (AR) > Bits: 16733373
-Shift and count bits > Bits: 15589355
+Optimized 1 bit/loop counter > Bits: 15830918
+Ratko's mystery algorithm > Bits: 18246946
+Recursive bit count by nybbles > Bits: 18853553
+Non-recursive bit count by nybbles > Bits: 17783741
+Non-recursive bit count by bytes (BW) > Bits: 16157105
+Non-recursive bit count by bytes (AR) > Bits: 13742280
+Shift and count bits > Bits: 15552206
exit 0
Modified: test-suite/trunk/MultiSource/Benchmarks/MiBench/automotive-bitcount/bitcnts.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/MiBench/automotive-bitcount/bitcnts.c?rev=111502&r1=111501&r2=111502&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/MiBench/automotive-bitcount/bitcnts.c (original)
+++ test-suite/trunk/MultiSource/Benchmarks/MiBench/automotive-bitcount/bitcnts.c Wed Aug 18 20:29:16 2010
@@ -53,12 +53,13 @@
puts("Bit counter algorithm benchmark\n");
+ srand48(1);
for (i = 0; i < FUNCS; i++) {
#if 0
start = clock();
#endif
- for (j = n = 0, seed = rand(); j < iterations; j++, seed += 13)
+ for (j = n = 0, seed = lrand48(); j < iterations; j++, seed += 13)
n += pBitCntFunc[i](seed);
#if 0
Modified: test-suite/trunk/SingleSource/Benchmarks/BenchmarkGame/puzzle.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/BenchmarkGame/puzzle.c?rev=111502&r1=111501&r2=111502&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/BenchmarkGame/puzzle.c (original)
+++ test-suite/trunk/SingleSource/Benchmarks/BenchmarkGame/puzzle.c Wed Aug 18 20:29:16 2010
@@ -8,7 +8,7 @@
int randInt(int min, int max) {
int k, n;
n = (max - min) + 1;
- k = (int)(n * (rand() / (RAND_MAX + 1.0)));
+ k = (int)(n * (lrand48() / (RAND_MAX + 1.0)));
return (k == n) ? k + min - 1 : k + min;
}
@@ -53,7 +53,7 @@
int i, j, duplicate;
int *rndArr;
- srand(1);
+ srand48(1);
for (i = 0; i < NLOOPS1; i++) {
rndArr = createRandomArray(ARRAY_SIZE);
@@ -64,4 +64,4 @@
}
return 0;
-}
\ No newline at end of file
+}
Modified: test-suite/trunk/SingleSource/Benchmarks/BenchmarkGame/puzzle.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/BenchmarkGame/puzzle.reference_output?rev=111502&r1=111501&r2=111502&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/BenchmarkGame/puzzle.reference_output (original)
+++ test-suite/trunk/SingleSource/Benchmarks/BenchmarkGame/puzzle.reference_output Wed Aug 18 20:29:16 2010
@@ -1,6 +1,6 @@
-Found duplicate: 4
-Found duplicate: 485365
-Found duplicate: 417267
-Found duplicate: 436989
-Found duplicate: 60067
+Found duplicate: 20816
+Found duplicate: 227247
+Found duplicate: 417409
+Found duplicate: 167994
+Found duplicate: 282745
exit 0
More information about the llvm-commits
mailing list