diff options
author | Matt Corallo <git@bluematt.me> | 2017-09-11 15:24:45 -0400 |
---|---|---|
committer | Matt Corallo <git@bluematt.me> | 2017-09-11 15:51:36 -0400 |
commit | 0b1b9148cd77092d2851eeed5c8c6d5ce117452a (patch) | |
tree | cea43a2e65ce78ee5672be68ab575878d604a345 /src/bench/bench.h | |
parent | 31e72b284ef54c4c221015c8d700946c6143fb7a (diff) | |
download | bitcoin-0b1b9148cd77092d2851eeed5c8c6d5ce117452a.tar.xz |
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.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/bench/bench.h b/src/bench/bench.h index 1f36f2a4bc..79109eaa56 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(); }; |