Branch: refs/heads/master
Home: https://github.com/conformal/btcwire
Commit: b6e6fc25dbb8bb1a820ddf22ef0e9aead704de1a
https://github.com/conformal/btcwire/commit/b6e6fc25dbb8bb1a820ddf22ef0e9aead704de1a
Author: David Hill <[email protected]>
Date: 2014-03-20 (Thu, 20 Mar 2014)
Changed paths:
M message.go
M msgtx.go
Log Message:
-----------
Preallocate memory for the message header in WriteMessageN and the
serialization buffer in MsgTx's TxSha().
Benchmarking shows this is slightly faster due to avoiding the extra
garbage collection in addition to less peak memory usage.
Before: BenchmarkTxShaOld 500000 5626 ns/op
After: BenchmarkTxShaNew 500000 5457 ns/op