aboutsummaryrefslogtreecommitdiff
path: root/src/bench/bench.h
diff options
context:
space:
mode:
authorMatt Corallo <[email protected]>2017-09-11 15:24:45 -0400
committerMatt Corallo <[email protected]>2017-09-11 15:51:36 -0400
commit0b1b9148cd77092d2851eeed5c8c6d5ce117452a (patch)
treecea43a2e65ce78ee5672be68ab575878d604a345 /src/bench/bench.h
parentMerge #11268: [macOS] remove Growl support, remove unused code (diff)
downloaddiscoin-0b1b9148cd77092d2851eeed5c8c6d5ce117452a.tar.xz
discoin-0b1b9148cd77092d2851eeed5c8c6d5ce117452a.zip
Remove countMaskInv caching in bench framework
We were saving a div by caching the inverse as a float, but this ended up requiring a int -> float -> int conversion, which takes almost as much time as the difference between float mul and div. There are lots of other more pressing issues with the bench framework which probably require simply removing the adaptive iteration count stuff anyway.
Diffstat (limited to 'src/bench/bench.h')
-rw-r--r--src/bench/bench.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/bench/bench.h b/src/bench/bench.h
index 1f36f2a4b..79109eaa5 100644
--- a/src/bench/bench.h
+++ b/src/bench/bench.h
@@ -41,7 +41,7 @@ namespace benchmark {
std::string name;
double maxElapsed;
double beginTime;
- double lastTime, minTime, maxTime, countMaskInv;
+ double lastTime, minTime, maxTime;
uint64_t count;
uint64_t countMask;
uint64_t beginCycles;
@@ -55,7 +55,6 @@ namespace benchmark {
minCycles = std::numeric_limits<uint64_t>::max();
maxCycles = std::numeric_limits<uint64_t>::min();
countMask = 1;
- countMaskInv = 1./(countMask + 1);
}
bool KeepRunning();
};