diff options
Diffstat (limited to 'benchmarks/hbench/patches/patch-an')
-rw-r--r-- | benchmarks/hbench/patches/patch-an | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/benchmarks/hbench/patches/patch-an b/benchmarks/hbench/patches/patch-an new file mode 100644 index 00000000000..b9b4cf3499b --- /dev/null +++ b/benchmarks/hbench/patches/patch-an @@ -0,0 +1,33 @@ +# $NetBSD: patch-an,v 1.1 2005/03/03 08:53:06 garbled Exp $ +--- ./src/timing.c Fri Jun 27 04:52:29 1997 ++++ work/hbench-OS/src/timing.c Wed Aug 14 14:11:22 2002 +@@ -201,19 +201,24 @@ + #ifdef DEBUG + printf(">> %d iteration gives %f seconds\n",num,((float)rtntime)*clkmul/1000000.); + #endif +- while ((time = ((float)rtntime)*clkmul) < 1000000.) { +- /* while less than one second */ +- num <<= 1; ++ while ((time = ((float)rtntime)*clkmul) < 1000000./16) { ++ /* while less than 1/16 second */ ++ num <<= 2; + if ((*workfn)(num, &rtntime) != 0) { + num >>= 1; + #ifdef DEBUG +- printf(">> backing off\n"); ++ printf(">> backing off to %d iterations\n", num); + #endif +- break; ++ return num; + } + #ifdef DEBUG + printf(">> %d iterations gives %f seconds\n",num,((float)rtntime)*clkmul/1000000.); + #endif ++ } ++ while (time < 1000000.) { ++ /* while less than one second */ ++ num <<= 1; ++ time *= 2; + } + #ifdef DEBUG + printf(">> Choosing %d iterations\n",num); |