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.
This commit is contained in:
+1
-2
@@ -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();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user