mempool: use mapNextTx.lower_bound in removeRecursive #24926

pull Crypt-iQ wants to merge 1 commits into bitcoin:master from Crypt-iQ:mapnexttx_04192022 changing 1 files +3 −5
  1. Crypt-iQ commented at 9:11 pm on April 19, 2022: contributor
    This is a minor optimization where mapNextTx can instead use lower_bound instead of calling find. I think lower_bound and increment should be more efficient compared to N find calls, plus the loop will exit early if there are no more entries in the map for the prevout hash which wasn’t the case previously.
  2. mempool: use mapNextTx.lower_bound in removeRecursive f4277110f7
  3. DrahtBot added the label Mempool on Apr 19, 2022
  4. fanquake commented at 1:37 pm on May 12, 2022: member

    This is a minor optimization … I think lower_bound and increment should be more efficient compared to N find calls

    Can you provide a benchmark?

  5. Crypt-iQ closed this on Jun 3, 2022

  6. DrahtBot locked this on Jun 3, 2023

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-01-21 06:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me