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

Issue 5431047: code review 5431047: go/printer, gofmt: more performance tweaks (Closed)

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

Description

go/printer, gofmt: more performance tweaks Removed more string conversions and streamlined bottleneck printing interface by removing unnecessary tests where possible. About 6% faster AST printing. Before: - printer.BenchmarkPrint 50 32056640 ns/op After: - printer.BenchmarkPrint 50 30138440 ns/op (-6%)

Patch Set 1 #

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

Patch Set 3 : diff -r 4b38f89d933d https://go.googlecode.com/hg/ #

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

Patch Set 5 : diff -r 4b38f89d933d https://go.googlecode.com/hg/ #

Patch Set 6 : diff -r 4b38f89d933d https://go.googlecode.com/hg/ #

Total comments: 4

Patch Set 7 : diff -r 5641d1093e82 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+100 lines, -99 lines) Patch
M src/pkg/go/printer/printer.go View 1 2 3 4 5 6 17 chunks +100 lines, -99 lines 0 comments Download

Messages

Total messages: 4
gri
Hello r@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 3 months ago (2011-11-23 02:02:00 UTC) #1
r
LGTM http://codereview.appspot.com/5431047/diff/4003/src/pkg/go/printer/printer.go File src/pkg/go/printer/printer.go (right): http://codereview.appspot.com/5431047/diff/4003/src/pkg/go/printer/printer.go#newcode131 src/pkg/go/printer/printer.go:131: // writeNewlines writes (at most) n newlines to ...
13 years, 3 months ago (2011-11-23 16:20:50 UTC) #2
gri
http://codereview.appspot.com/5431047/diff/4003/src/pkg/go/printer/printer.go File src/pkg/go/printer/printer.go (right): http://codereview.appspot.com/5431047/diff/4003/src/pkg/go/printer/printer.go#newcode131 src/pkg/go/printer/printer.go:131: // writeNewlines writes (at most) n newlines to p.output ...
13 years, 3 months ago (2011-11-23 17:27:02 UTC) #3
gri
13 years, 3 months ago (2011-11-23 17:27:41 UTC) #4
*** Submitted as http://code.google.com/p/go/source/detail?r=1b010352ab57 ***

go/printer, gofmt: more performance tweaks

Removed more string conversions and streamlined bottleneck
printing interface by removing unnecessary tests where possible.
About 6% faster AST printing.

Before:
- printer.BenchmarkPrint		50	32056640 ns/op

After:
- printer.BenchmarkPrint		50	30138440 ns/op (-6%)

R=r
CC=golang-dev
http://codereview.appspot.com/5431047
Sign in to reply to this message.

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