bitcoin/src/bench
MarcoFalke 9e8bd217cd
Merge #13204: Faster sigcache nonce
152e8baf08 Use salted hasher instead of nonce in sigcache (Jeremy Rubin)
5495fa5850 Add Hash Padding Microbenchmarks (Jeremy Rubin)

Pull request description:

  This PR replaces nonces in two places with pre-salted hashers.

  The nonce is chosen to be 64 bytes long so that it forces the SHA256 hasher to process the chunk. This leaves the next 64 (or 56 depending if final chunk) open for data. In the case of the script execution cache, this does not make a big performance improvement because the nonce was already properly padded to fit into one buffer, but does make the code a little simpler. In the case of the sig cache, this should reduce the hashing overhead slightly because we are less likely to need an additional processing step.

  I haven't benchmarked this, but back of the envelope it should reduce the hashing by one buffer for all combinations except compressed public keys with compact signatures.

ACKs for top commit:
  ryanofsky:
    Code review ACK 152e8baf08. No code changes, just rebase since last review and expanded commit message

Tree-SHA512: b133e902fd595cfe3b54ad8814b823f4d132cb2c358c89158842ae27daee56ab5f70cde2585078deb46f77a6e7b35b4cc6bba47b65302b7befc2cff254bad93d
2020-06-02 07:32:15 -04:00
..
data Add deserialize + CheckBlock benchmarks, and a full block hex 2016-11-09 11:27:59 -08:00
.gitignore Ignore bench_bitcoin binary. 2015-10-06 17:46:12 +02:00
addrman.cpp bench: add CAddrMan benchmarks 2020-04-21 15:06:59 +02:00
base58.cpp scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
bech32.cpp scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
bench.cpp bench: Remove requirement that all benches use RegTestingSetup 2020-04-17 10:19:32 -04:00
bench.h bench: Remove requirement that all benches use RegTestingSetup 2020-04-17 10:19:32 -04:00
bench_bitcoin.cpp Merge #18673: scripted-diff: Sort test includes 2020-04-17 10:12:13 -04:00
block_assemble.cpp bench: Start nodes with -nodebuglogfile 2020-04-24 16:46:54 -04:00
ccoins_caching.cpp Remove CCoinsViewCache::GetValueIn(...) 2020-05-03 18:42:14 +00:00
chacha20.cpp Remove unused includes 2019-10-15 22:56:43 +00:00
chacha_poly_aead.cpp scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
checkblock.cpp scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
checkqueue.cpp bench: Remove requirement that all benches use RegTestingSetup 2020-04-17 10:19:32 -04:00
coin_selection.cpp Refactor: Allow LegacyScriptPubKeyMan to be null 2020-01-23 16:34:28 -05:00
crypto_hash.cpp scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
data.cpp bench: Move generated data to a dedicated translation unit 2019-07-02 18:11:15 +01:00
data.h bench: Move generated data to a dedicated translation unit 2019-07-02 18:11:15 +01:00
duplicate_inputs.cpp bench: Start nodes with -nodebuglogfile 2020-04-24 16:46:54 -04:00
examples.cpp scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
gcs_filter.cpp blockfilter: Refactor GCS params into struct. 2018-11-06 09:12:54 -08:00
hashpadding.cpp Add Hash Padding Microbenchmarks 2020-04-29 00:31:41 -07:00
lockedpool.cpp scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
mempool_eviction.cpp bench: Start nodes with -nodebuglogfile 2020-04-24 16:46:54 -04:00
mempool_stress.cpp bench: Remove requirement that all benches use RegTestingSetup 2020-04-17 10:19:32 -04:00
merkle_root.cpp scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
poly1305.cpp Remove unused includes 2019-10-15 22:56:43 +00:00
prevector.cpp Convert everything except wallet/qt to new serialization 2020-03-30 16:10:30 -07:00
rollingbloom.cpp scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
rpc_blockchain.cpp scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
rpc_mempool.cpp Remove unused includes 2019-10-15 22:56:43 +00:00
util_time.cpp util: Add type safe GetTime 2019-05-23 14:12:32 -04:00
verify_script.cpp bench: Remove requirement that all benches use RegTestingSetup 2020-04-17 10:19:32 -04:00
wallet_balance.cpp bench: Start nodes with -nodebuglogfile 2020-04-24 16:46:54 -04:00