Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1312)

Issue 8118044: code review 8118044: net/http: parse Request-Line in a function, remove an a... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 11 months ago by bradfitz
Modified:
11 years, 11 months ago
Reviewers:
CC:
golang-dev, gri
Visibility:
Public.

Description

net/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/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -4 lines) Patch
M src/pkg/net/http/request.go View 1 2 chunks +14 lines, -4 lines 0 comments Download

Messages

Total messages: 3
bradfitz
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
11 years, 11 months ago (2013-03-28 21:10:22 UTC) #1
gri
LGTM
11 years, 11 months ago (2013-03-28 21:15:02 UTC) #2
bradfitz
11 years, 11 months ago (2013-03-28 21:19:55 UTC) #3
*** Submitted as https://code.google.com/p/go/source/detail?r=a933e165d2ff ***

net/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%

R=golang-dev, gri
CC=golang-dev
https://codereview.appspot.com/8118044
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b