Descriptionnet/http: server optimization; reduce GCs, generate ~half the garbage
There was another bufio.Writer not being reused, found with
GOGC=off and -test.memprofile.
benchmark old ns/op new ns/op delta
BenchmarkServerFakeConnWithKeepAlive 18270 16046 -12.17%
benchmark old allocs new allocs delta
BenchmarkServerFakeConnWithKeepAlive 38 36 -5.26%
benchmark old bytes new bytes delta
BenchmarkServerFakeConnWithKeepAlive 4598 2488 -45.89%
Update issue 5100
Patch Set 1 #Patch Set 2 : diff -r 2eb36d0ca449 https://go.googlecode.com/hg/ #Patch Set 3 : diff -r 2eb36d0ca449 https://go.googlecode.com/hg/ #Patch Set 4 : diff -r 310e55e6ddc5 https://go.googlecode.com/hg/ #MessagesTotal messages: 4
|