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

Issue 5491054: code review 5491054: fmt: speed up floating point print, clean up some code (Closed)

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

Description

fmt: speed up floating point print, clean up some code %g down to two mallocs from four. Also a mild speedup. fmt_test.BenchmarkSprintfFloat 3016 2703 -10.38% Fixes issue 2557.

Patch Set 1 #

Total comments: 1

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

Patch Set 3 : diff -r 0e5409a34221 https://go.googlecode.com/hg/ #

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -48 lines) Patch
M src/pkg/fmt/format.go View 1 2 4 chunks +49 lines, -44 lines 0 comments Download
M src/pkg/fmt/print.go View 2 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 6
r
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 3 months ago (2011-12-15 19:37:39 UTC) #1
rsc
http://codereview.appspot.com/5491054/diff/1/src/pkg/fmt/format.go File src/pkg/fmt/format.go (right): http://codereview.appspot.com/5491054/diff/1/src/pkg/fmt/format.go#newcode292 src/pkg/fmt/format.go:292: var b bytes.Buffer // TODO: Avoid buffer by pre-padding.
13 years, 3 months ago (2011-12-15 19:47:16 UTC) #2
r
Hello rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 3 months ago (2011-12-15 19:49:49 UTC) #3
r
Hello rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 3 months ago (2011-12-15 19:50:39 UTC) #4
rsc
LGTM That turned out nice.
13 years, 3 months ago (2011-12-15 19:52:55 UTC) #5
r
13 years, 3 months ago (2011-12-15 20:52:33 UTC) #6
*** Submitted as http://code.google.com/p/go/source/detail?r=6cfb9f2415fa ***

fmt: speed up floating point print, clean up some code
%g down to two mallocs from four. Also a mild speedup.

fmt_test.BenchmarkSprintfFloat         3016         2703  -10.38%

Fixes issue 2557.

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

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