Descriptionnet/http: reuse textproto.Readers; remove 2 more allocations
Saves both the textproto.Reader allocation, and its internal
scratch buffer growing.
benchmark old ns/op new ns/op delta
BenchmarkServerFakeConnWithKeepAliveLite 10324 10149 -1.70%
benchmark old allocs new allocs delta
BenchmarkServerFakeConnWithKeepAliveLite 19 17 -10.53%
benchmark old bytes new bytes delta
BenchmarkServerFakeConnWithKeepAliveLite 1559 1492 -4.30%
Patch Set 1 #Patch Set 2 : diff -r a933e165d2ff https://go.googlecode.com/hg/ #Patch Set 3 : diff -r a933e165d2ff https://go.googlecode.com/hg/ #
Total comments: 3
Patch Set 4 : diff -r f9cb5530d0d8 https://go.googlecode.com/hg/ #MessagesTotal messages: 5
|