Descriptionnet/http: reuse bufio.Reader and bufio.Writer between conns
Saves over 8KB of allocations per new connection.
benchmark old ns/op new ns/op delta
BenchmarkServerFakeConnNoKeepAlive 28777 24927 -13.38%
benchmark old allocs new allocs delta
BenchmarkServerFakeConnNoKeepAlive 52 46 -11.54%
benchmark old bytes new bytes delta
BenchmarkServerFakeConnNoKeepAlive 13716 5286 -61.46%
Patch Set 1 #Patch Set 2 : diff -r 31ae6d73fdb0 https://go.googlecode.com/hg/ #Patch Set 3 : diff -r 31ae6d73fdb0 https://go.googlecode.com/hg/ #
Total comments: 2
Patch Set 4 : diff -r 5851b45d1c82 https://go.googlecode.com/hg/ #
Total comments: 1
Patch Set 5 : diff -r 86d952ac0976 https://go.googlecode.com/hg/ #Patch Set 6 : diff -r b22e986f983e https://go.googlecode.com/hg/ #MessagesTotal messages: 8
|