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

Issue 51360047: code review 51360047: ioutil: remove discard pool. Now stack allocated.

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 3 months ago by crawshaw1
Modified:
10 years, 2 months ago
Visibility:
Public.

Description

ioutil: remove discard pool. Now stack allocated. With a small benchmark: func BenchmarkDiscard(b *testing.B) { b.StopTimer() buf := make([]byte, 1e9) for i := 0; i < b.N; i++ { b.StopTimer() r := bytes.NewReader(buf) b.StartTimer() io.Copy(Discard, r) } } before: BenchmarkDiscard 50000 58.7 ns/op 0 B/op 0 allocs/op after: BenchmarkDiscard 50000 56.5 ns/op 0 B/op 0 allocs/op

Patch Set 1 #

Patch Set 2 : diff -r 7abe32ccffb1 https://code.google.com/p/go #

Patch Set 3 : diff -r 7abe32ccffb1 https://code.google.com/p/go #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -11 lines) Patch
M src/pkg/io/ioutil/ioutil.go View 1 2 chunks +2 lines, -11 lines 1 comment Download

Messages

Total messages: 8
crawshaw1
Hello golang-codereviews@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
10 years, 3 months ago (2014-01-23 12:32:53 UTC) #1
dvyukov
How does the escape analysis work though the interface call?... I must be missing something...
10 years, 3 months ago (2014-01-23 12:49:23 UTC) #2
dave_cheney.net
Maybe the pool wasn't much use in this instance. In this change bufp escapes to ...
10 years, 2 months ago (2014-01-31 01:14:21 UTC) #3
bradfitz
Not LGTM Not until I hear an explanation of how this could work. Dmitry was ...
10 years, 2 months ago (2014-01-31 01:21:59 UTC) #4
crawshaw1
As soon as Dmitry pointed out it's an interface, I was confused too. Presumably I ...
10 years, 2 months ago (2014-01-31 01:24:58 UTC) #5
bradfitz
I find many benchmarks aren't stable until the benchtime flag is long enough. Also look ...
10 years, 2 months ago (2014-01-31 01:27:05 UTC) #6
dave_cheney.net
R=close
10 years, 2 months ago (2014-02-05 02:48:47 UTC) #7
gobot
10 years, 2 months ago (2014-02-05 22:43:10 UTC) #8
R=close (assigned by dave@cheney.net)
Sign in to reply to this message.

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