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

Issue 5561056: code review 5561056: compress/flate: use append() instead of slice+counter.

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 3 months ago by Ivan Krasin
Modified:
12 years, 3 months ago
Reviewers:
rsc
CC:
rsc, nigeltao, golang-dev
Visibility:
Public.

Description

compress/flate: use append() instead of slice+counter.

Patch Set 1 : diff -r b372a927701e https://go.googlecode.com/hg/ #

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

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -18 lines) Patch
M src/pkg/compress/flate/deflate.go View 6 chunks +13 lines, -18 lines 3 comments Download

Messages

Total messages: 6
Ivan Krasin
Hello rsc@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
12 years, 3 months ago (2012-01-21 20:48:20 UTC) #1
Ivan Krasin
This is a stylistic change. It does not affect performance or functionality.
12 years, 3 months ago (2012-01-21 20:49:06 UTC) #2
nigeltao
http://codereview.appspot.com/5561056/diff/5/src/pkg/compress/flate/deflate.go File src/pkg/compress/flate/deflate.go (right): http://codereview.appspot.com/5561056/diff/5/src/pkg/compress/flate/deflate.go#newcode210 src/pkg/compress/flate/deflate.go:210: d.tokens = make([]token, maxFlateBlockTokens+1)[0:0] I'd write it as d.tokens ...
12 years, 3 months ago (2012-01-22 22:32:25 UTC) #3
rsc
LGTM I had to merge the change by hand so I fixed the things Nigel ...
12 years, 3 months ago (2012-01-23 14:26:01 UTC) #4
rsc
*** Submitted as http://code.google.com/p/go/source/detail?r=7a7845c58955 *** compress/flate: use append instead of slice+counter. R=rsc, nigeltao CC=golang-dev http://codereview.appspot.com/5561056 ...
12 years, 3 months ago (2012-01-23 14:26:17 UTC) #5
Ivan Krasin
12 years, 3 months ago (2012-01-23 18:50:34 UTC) #6
http://codereview.appspot.com/5561056/diff/5/src/pkg/compress/flate/deflate.go
File src/pkg/compress/flate/deflate.go (right):

http://codereview.appspot.com/5561056/diff/5/src/pkg/compress/flate/deflate.g...
src/pkg/compress/flate/deflate.go:253: d.tokens = d.tokens[0:0]
On 2012/01/22 22:32:25, nigeltao wrote:
> I'd write this as
> d.tokens = d.tokens[:0]

Thanks. You're right in both cases. I don't know what I have thought about :)
Sign in to reply to this message.

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