Branch: refs/heads/master
  Home:   https://github.com/conformal/btcwire
  Commit: 87ce23d6791917c41533c85f9113c13512c7f555
      
https://github.com/conformal/btcwire/commit/87ce23d6791917c41533c85f9113c13512c7f555
  Author: Dave Collins <[email protected]>
  Date:   2013-11-05 (Tue, 05 Nov 2013)

  Changed paths:
    M bench_test.go

  Log Message:
  -----------
  Add benchmarks for readVarInt.

This commit adds a few benchmarks for the readVarInt function.


  Commit: 6263efcc716b6827158afaa7eb6bad62bd79effa
      
https://github.com/conformal/btcwire/commit/6263efcc716b6827158afaa7eb6bad62bd79effa
  Author: Dave Collins <[email protected]>
  Date:   2013-11-05 (Tue, 05 Nov 2013)

  Changed paths:
    M common.go

  Log Message:
  -----------
  Slightly optimize readVarInt.

This commit slightly optimizes the readVarInt function in the case of
multiple-byte variable length integers.  It also reduces the amount of
memory garbage it generates.

Before:

BenchmarkReadVarInt1     5000000               386 ns/op
BenchmarkReadVarInt3     5000000               693 ns/op
BenchmarkReadVarInt5     2000000               793 ns/op
BenchmarkReadVarInt9     5000000               709 ns/op

After:

BenchmarkReadVarInt1     5000000               387 ns/op
BenchmarkReadVarInt3     5000000               471 ns/op
BenchmarkReadVarInt5     5000000               575 ns/op
BenchmarkReadVarInt9     5000000               473 ns/op

This is part ef the ongoing effort to optimize serialization as noted in
conformal/btcd#27.


Compare: 
https://github.com/conformal/btcwire/compare/50c10faf4e67...6263efcc716b

Reply via email to