jackpal/bencode-go — pull request #1 by nictuku (2014-08-26 20:36:53+00:00)
Title: Reduce allocations in bencode

Note the B/op column.

Before:
$ go test -benchmem -bench=.
PASS
BenchmarkDecodeAll 5000 483495 ns/op 62057 B/op 186 allocs/op
BenchmarkUnmarshalAll 5000 788224 ns/op 66498 B/op 291 allocs/op

After
$ go test -benchmem -bench=.
PASS
BenchmarkDecodeAll 10000 277428 ns/op 7681 B/op 160 allocs/op
BenchmarkUnmarshalAll 5000 528511 ns/op 12674 B/op 274 allocs/op

I tried to send you this patch list before, but code.google.com doesn't have a nice "pull request" flow..