HomePhabricator

Merge #16073: refactor: Improve CRollingBloomFilter::reset by using std::fill

Description

Merge #16073: refactor: Improve CRollingBloomFilter::reset by using std::fill

Summary:
df9e15f092c18a8047f09307576c2b77b9c8d01c refactor: Improve CRollingBloomFilter::reset by using std::fill (João Barbosa)
d2dbc7da26e1ca40200521c05a0b1ca75578acd2 bench: Add benchmark for CRollingBloomFilter::reset (João Barbosa)

Pull request description:

Cleaner code. Also improves performance with `--enable-debug` (which is meaningless to non-developers).

Before:
```
# Benchmark, evals, iterations, total, min, max, median
RollingBloomReset, 5, 150, 19.3008, 0.0254917, 0.0259195, 0.0257395
```
After:
```
# Benchmark, evals, iterations, total, min, max, median
RollingBloomReset, 5, 150, 5.43269, 0.00720651, 0.00729697, 0.00724854
```

ACKs for commit df9e15:

MarcoFalke:
  re-utACK df9e15f092
jamesob:
  re-utACK https://github.com/bitcoin/bitcoin/pull/16073/commits/df9e15f092c18a8047f09307576c2b77b9c8d01c

Tree-SHA512: 22038411dfd41afad77b17a3da9ee04476ffbd4d215dcf47bdd9f14588759bc328a55d958dcebc2036b52ce4c56f79b1284eae11e56ddfaf21f0b2ee1c6a914a

Backport of Core PR16073

Test Plan: ninja check bench-bitcoin

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D6485

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on May 22 2019, 19:05
jasonbcoxCommitted on Jun 9 2020, 19:36
jasonbcoxPushed on Jun 9 2020, 19:36
Reviewer
Restricted Project
Differential Revision
D6485: Merge #16073: refactor: Improve CRollingBloomFilter::reset by using std::fill
Parents
rABCc1e1a85bd303: Merge #15343: [doc] netaddress: Make IPv4 loopback comment more descriptive
Branches
Unknown
Tags
Unknown