aboutsummaryrefslogtreecommitdiff
path: root/src/httpserver.cpp
diff options
context:
space:
mode:
authorMartin Ankerl <[email protected]>2019-09-24 20:54:58 +0200
committerMartin Ankerl <[email protected]>2019-09-25 20:56:38 +0200
commit67d99900b0d770038c9c5708553143137b124a6c (patch)
tree4f08c47dbd31967b616d7dcc93d7e228aaad9a8a /src/httpserver.cpp
parentMerge #16929: test: follow-up to rpc: default maxfeerate value as BTC/kB (diff)
downloaddiscoin-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