bitcoin/bitcoin — pull request #2221 by sipa (2013-01-26 17:50:22+00:00)
Title: 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 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).