aboutsummaryrefslogtreecommitdiff
path: root/src/bench/crypto_hash.cpp
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2018-07-26 16:33:45 +0200
committerpracticalswift <practicalswift@users.noreply.github.com>2018-08-02 14:30:53 +0200
commitcdf4089457856bdfe336b6f4b337d7e1ea4fdbd3 (patch)
tree9c7e66306acaff0756d5a871b8556220f5a90bfa /src/bench/crypto_hash.cpp
parente57766906237834906b979a59015eed218d34656 (diff)
downloadbitcoin-cdf4089457856bdfe336b6f4b337d7e1ea4fdbd3.tar.xz
Remove redundant assignments (dead stores)
Diffstat (limited to 'src/bench/crypto_hash.cpp')
-rw-r--r--src/bench/crypto_hash.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/bench/crypto_hash.cpp b/src/bench/crypto_hash.cpp
index 7d907eaf10..3ff106cb87 100644
--- a/src/bench/crypto_hash.cpp
+++ b/src/bench/crypto_hash.cpp
@@ -80,18 +80,16 @@ static void SipHash_32b(benchmark::State& state)
static void FastRandom_32bit(benchmark::State& state)
{
FastRandomContext rng(true);
- uint32_t x = 0;
while (state.KeepRunning()) {
- x += rng.rand32();
+ rng.rand32();
}
}
static void FastRandom_1bit(benchmark::State& state)
{
FastRandomContext rng(true);
- uint32_t x = 0;
while (state.KeepRunning()) {
- x += rng.randbool();
+ rng.randbool();
}
}