]> Cypherpunks repositories - gostls13.git/commit
net/http: server optimization; reduce GCs, generate ~half the garbage
authorBrad Fitzpatrick <bradfitz@golang.org>
Wed, 27 Mar 2013 20:35:49 +0000 (13:35 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 27 Mar 2013 20:35:49 +0000 (13:35 -0700)
commit393b3b130489b86d44b45f2fa7c53e62516a0aaa
tree3e4a51a7df780f798e0cbf633740ab95e403055c
parent584a66b785af8c99b4bba3cb31c2b5e22f689438
net/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 #5100

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/8038047
src/pkg/net/http/server.go