Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use std::unordered_set instead of std::vector in IsEvicted()
Summary: An unordered set can tell if an element is present in ~O(1) time (constant on average, worst case linear to the size of the container), which speeds up and simplifies the lookup in IsEvicted(). Co-authored-by: Vasil Dimov <vd@FreeBSD.org> This is a backport of [[bitcoin/bitcoin#20197 | core#20197]] [3/6] bitcoin/bitcoin@ca63b53 Depends on D10976 Test Plan: `ninja check` Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D10977
- Loading branch information