mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-19 03:20:37 +00:00
Merge #9200: bench: Fix subtle counting issue when rescaling iteration count
e0a9cb2 bench: Fix subtle counting issue when rescaling iteration count (Wladimir J. van der Laan)
This commit is contained in:
commit
55b2eddcc8
@ -64,8 +64,11 @@ bool State::KeepRunning()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (elapsed*16 < maxElapsed) {
|
if (elapsed*16 < maxElapsed) {
|
||||||
countMask = ((countMask<<1)|1) & ((1LL<<60)-1);
|
uint64_t newCountMask = ((countMask<<1)|1) & ((1LL<<60)-1);
|
||||||
countMaskInv = 1./(countMask+1);
|
if ((count & newCountMask)==0) {
|
||||||
|
countMask = newCountMask;
|
||||||
|
countMaskInv = 1./(countMask+1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lastTime = now;
|
lastTime = now;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user