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

Issue 166041: code review 166041: Add ReadFrom and WriteTo methods to bytes.Buffer, to en... (Closed)

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

Description

Add ReadFrom and WriteTo methods to bytes.Buffer, to enable i/o without buffer allocation. Use them in Copy and Copyn. Speed up ReadFile by using ReadFrom and avoiding Copy altogether (a minor win).

Patch Set 1 #

Patch Set 2 : code review 166041: Add ReadFrom and WriteTo methods to bytes.Buffer, to en... #

Total comments: 6

Patch Set 3 : code review 166041: Add ReadFrom and WriteTo methods to bytes.Buffer, to en... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+194 lines, -5 lines) Patch
M src/pkg/bytes/buffer.go View 1 2 2 chunks +55 lines, -0 lines 0 comments Download
M src/pkg/bytes/buffer_test.go View 1 chunk +22 lines, -0 lines 0 comments Download
M src/pkg/io/io.go View 1 2 3 chunks +32 lines, -0 lines 0 comments Download
A src/pkg/io/io_test.go View 1 2 1 chunk +80 lines, -0 lines 0 comments Download
M src/pkg/io/ioutil/ioutil.go View 1 chunk +5 lines, -5 lines 0 comments Download

Messages

Total messages: 3
r
Hello rsc, gri (cc: golang-dev@googlegroups.com), I'd like you to review the following change.
14 years, 4 months ago (2009-12-03 19:21:12 UTC) #1
rsc
LGTM http://codereview.appspot.com/166041/diff/1001/1002 File src/pkg/bytes/buffer.go (right): http://codereview.appspot.com/166041/diff/1001/1002#newcode96 src/pkg/bytes/buffer.go:96: // Buffer.ReadFrom. As long as the Buffer has ...
14 years, 4 months ago (2009-12-03 20:44:40 UTC) #2
r
14 years, 4 months ago (2009-12-03 20:56:18 UTC) #3
*** Submitted as http://code.google.com/p/go/source/detail?r=27508885c08d ***

Add ReadFrom and WriteTo methods to bytes.Buffer, to enable i/o without buffer
allocation.
Use them in Copy and Copyn.
Speed up ReadFile by using ReadFrom and avoiding Copy altogether (a minor win).

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

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