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