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

Issue 4344060: code review 4344060: bufio: Write and WriteString improvements (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 1 month ago by eds
Modified:
14 years, 1 month ago
Reviewers:
CC:
rsc, ality, rog, golang-dev
Visibility:
Public.

Description

bufio: Write and WriteString improvements Write never writes less than the buffer size and WriteString takes advantage of the copy built-in to improve write efficiency.

Patch Set 1 #

Patch Set 2 : diff -r 1746d424a2f8 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 1746d424a2f8 https://go.googlecode.com/hg/ #

Total comments: 3

Patch Set 4 : diff -r 9f27edac5018 https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r 9f27edac5018 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -41 lines) Patch
M src/pkg/bufio/bufio.go View 1 2 3 4 2 chunks +27 lines, -41 lines 0 comments Download

Messages

Total messages: 10
eds
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
14 years, 1 month ago (2011-04-04 06:02:17 UTC) #1
ality
http://codereview.appspot.com/4344060/diff/3/src/pkg/bufio/bufio.go File src/pkg/bufio/bufio.go (right): http://codereview.appspot.com/4344060/diff/3/src/pkg/bufio/bufio.go#newcode507 src/pkg/bufio/bufio.go:507: return b.Write([]byte(s)) The []byte(s) here will cause an allocation. ...
14 years, 1 month ago (2011-04-04 09:04:47 UTC) #2
eds
On Mon, Apr 4, 2011 at 9:04 PM, <ality@pbrane.org> wrote: > The []byte(s) here will ...
14 years, 1 month ago (2011-04-04 09:14:05 UTC) #3
rog
http://codereview.appspot.com/4344060/diff/3/src/pkg/bufio/bufio.go File src/pkg/bufio/bufio.go (right): http://codereview.appspot.com/4344060/diff/3/src/pkg/bufio/bufio.go#newcode507 src/pkg/bufio/bufio.go:507: return b.Write([]byte(s)) On 2011/04/04 09:04:48, ality wrote: > The ...
14 years, 1 month ago (2011-04-04 09:58:30 UTC) #4
rsc
http://codereview.appspot.com/4344060/diff/3/src/pkg/bufio/bufio.go File src/pkg/bufio/bufio.go (right): http://codereview.appspot.com/4344060/diff/3/src/pkg/bufio/bufio.go#newcode507 src/pkg/bufio/bufio.go:507: return b.Write([]byte(s)) Allocating here is not okay. Allocation is ...
14 years, 1 month ago (2011-04-04 12:40:35 UTC) #5
rog
On 4 April 2011 13:40, <rsc@golang.org> wrote: > > http://codereview.appspot.com/4344060/diff/3/src/pkg/bufio/bufio.go > File src/pkg/bufio/bufio.go (right): > ...
14 years, 1 month ago (2011-04-04 13:52:51 UTC) #6
eds
Hello rsc, ality, rog (cc: golang-dev@googlegroups.com), Please take another look.
14 years, 1 month ago (2011-04-04 18:26:14 UTC) #7
rog
LGTM, but then it would. On 4 April 2011 19:26, <chickencha@gmail.com> wrote: > Hello rsc, ...
14 years, 1 month ago (2011-04-04 18:49:06 UTC) #8
rsc
LGTM
14 years, 1 month ago (2011-04-04 19:11:31 UTC) #9
rsc
14 years, 1 month ago (2011-04-04 19:57:11 UTC) #10
*** Submitted as e1efe298340c ***

bufio: Write and WriteString cleanup

Write never writes less than the buffer size and WriteString takes advantage
of the copy built-in to improve write efficiency.

R=rsc, ality, rog
CC=golang-dev
http://codereview.appspot.com/4344060

Committer: Russ Cox <rsc@golang.org>
Sign in to reply to this message.

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