We can avoid many unnecessary std::vector allocations by changing
CBloomFilter to take Spans instead of std::vector's for the insert
and contains operations.CBloomFilter currently converts types such as CDataStream and uint256
to std::vector on insert and contains. This is unnecessary because
CDataStreams and uint256 are already std::vectors internally. We just
need a way to point to the right data within those types. Span gives
us this ability.Signed-off-by: William Casarin <jb55@jb55.com>
https://github.com/bitcoin/bitcoin/pull/23115/commits/2ba4ddf31d27bebc144b3729479967b40bbe0b6a
refactor: Remove unused MakeUCharSpan
https://github.com/bitcoin/bitcoin/pull/23137/commits/fac303c504ab19b863fddc7a0093068fee9d4ef3
This is a partial backport of core#23115 and core#23137