Various performance tweaks to CCoinsView #2221

pull sipa wants to merge 1 commits into bitcoin:master from sipa:perfo changing 4 files +47 −37
  1. sipa commented at 5:50 PM on January 26, 2013: member
    • Pass txid's to CCoinsView functions by reference instead of by value
    • Add a method to swap CCoins, and use it in some places to avoid an allocating copy + destruct.
    • Optimize CCoinsViewCache::FetchCoins to do only a single search through the backing map.

    These changes (mostly the last one) increases raw block connection speed by 12% for me (rebuild of coins/ to block 210000 with -dbcache=900 takes 6m55 instead of 7m48).

  2. Various performance tweaks to CCoinsView
    * Pass txid's to CCoinsView functions by reference instead of by value
    * Add a method to swap CCoins, and use it in some places to avoid a
      allocating copy + destruct.
    * Optimize CCoinsViewCache::FetchCoins to do only a single search
      through the backing map.
    f369d02c51
  3. BitcoinPullTester commented at 6:31 PM on January 26, 2013: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/f369d02c51077ffa1644954d0478e93966e1bb72 for binaries and test log.

  4. jgarzik commented at 8:12 PM on January 26, 2013: contributor

    ACK

  5. gavinandresen referenced this in commit cc67f1e2b4 on Feb 22, 2013
  6. gavinandresen merged this on Feb 22, 2013
  7. gavinandresen closed this on Feb 22, 2013

  8. sipa deleted the branch on May 3, 2013
  9. laudney referenced this in commit 2680ce4c3e on Mar 19, 2014
  10. DrahtBot locked this on Sep 8, 2021

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: 2026-04-19 09:16 UTC

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