ripple/rippled — pull request #610 by nbougalis (2014-10-07 03:18:47+00:00)
Title: Cache calculated transaction IDs

After reviewing some profile data from tests, optimizing `SerializedTransaction::getTransactionID` seemed like a low-risk, moderate-reward modification. Cache the calculated transaction ID (cached results are being returned 63.57% of the time according to my test), and use references to further reduce overhead by avoiding expensive copying of `uint256` objects.

Reviews: @JoelKatz, @ximinez.

Of particular interest is this change to use a reference instead of a copy of a `uint256` in `Key`: https://github.com/nbougalis/rippled/compare/perf?expand=1#diff-9a6914338001348adab12c49e3ab9bb9L67