net/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% R=golang-dev, r, gri CC=golang-dev https://golang.org/cl/8094046
Showing
Please register or sign in to comment