Descriptionnet/http: parse Request-Line in a function, remove an allocation
Removes another per-request allocation. Also makes the code more
readable, IMO. And more testable.
benchmark old ns/op new ns/op delta
BenchmarkServerFakeConnWithKeepAliveLite 10539 10324 -2.04%
benchmark old allocs new allocs delta
BenchmarkServerFakeConnWithKeepAliveLite 20 19 -5.00%
benchmark old bytes new bytes delta
BenchmarkServerFakeConnWithKeepAliveLite 1609 1559 -3.11%
Patch Set 1 #Patch Set 2 : diff -r 5fde0c239ade https://go.googlecode.com/hg/ #Patch Set 3 : diff -r 5fde0c239ade https://go.googlecode.com/hg/ #Patch Set 4 : diff -r 5fde0c239ade https://go.googlecode.com/hg/ #MessagesTotal messages: 3
|