Having the hash noexcept allows libstdc++'s unordered_map to recalculate the hash during rehash, so it does not have to cache the value. This reduces node's memory by sizeof(size_t). The required recalculation has a slight performance penalty (around 1.6%), but this is compensated by memory savings of about 9% which allow for a larger dbcache setting.
Synopsis
Declared in <util/hasher.h>
size_t
operator()(COutPoint const& id) const noexcept;
Return Value
The salted SipHash of the outpoint's hash and index.
Parameters
Name |
Description |
id |
The outpoint to hash. |
See Also
https://gcc.gnu.org/onlinedocs/gcc‐13.2.0/libstdc++/manual/manual/unordered_associative.html
Created with MrDocs