diff options
| author | Martin Ankerl <[email protected]> | 2019-09-24 20:54:58 +0200 |
|---|---|---|
| committer | Martin Ankerl <[email protected]> | 2019-09-25 20:56:38 +0200 |
| commit | 67d99900b0d770038c9c5708553143137b124a6c (patch) | |
| tree | 4f08c47dbd31967b616d7dcc93d7e228aaad9a8a /src/httpserver.cpp | |
| parent | Merge #16929: test: follow-up to rpc: default maxfeerate value as BTC/kB (diff) | |
| download | discoin-67d99900b0d770038c9c5708553143137b124a6c.tar.xz discoin-67d99900b0d770038c9c5708553143137b124a6c.zip | |
make SaltedOutpointHasher noexcept
If the hash is not noexcept, unorderd_map has to assume that it can throw an exception. Thus when rehashing care needs to be taken. libstdc++ solves this by simply caching the hash value, which increases memory of each node by 8 bytes. Adding noexcept prevents this caching. In my experiments with -reindex-chainstate -stopatheight=594000, memory usage has decreased by 9.4% while runtime has increased by 1.6% due to additional hashing. Additionally, memusage::DynamicUsage() is now more accurate and does not underestimate.
Diffstat (limited to 'src/httpserver.cpp')
0 files changed, 0 insertions, 0 deletions