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

Issue 5494060: code review 5494060: strconv: implement fast path for rounding already short... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 7 months ago by remyoudompheng
Modified:
13 years, 6 months ago
Reviewers:
CC:
rsc, golang-dev, remy_archlinux.org
Visibility:
Public.

Description

strconv: implement fast path for rounding already short numbers. benchmark old ns/op new ns/op delta BenchmarkFormatFloatDecimal 3765 1386 -63%

Patch Set 1 #

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

Patch Set 3 : diff -r 3036d2362ea5 https://go.googlecode.com/hg/ #

Total comments: 7

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

Total comments: 2

Patch Set 5 : diff -r 29382b5af719 https://go.googlecode.com/hg/ #

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

Messages

Total messages: 12
remyoudompheng
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com, remy@archlinux.org), I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 7 months ago (2011-12-16 22:52:31 UTC) #1
rsc
http://codereview.appspot.com/5494060/diff/1002/src/pkg/strconv/ftoa.go File src/pkg/strconv/ftoa.go (right): http://codereview.appspot.com/5494060/diff/1002/src/pkg/strconv/ftoa.go#newcode189 src/pkg/strconv/ftoa.go:189: // If d is not denormal, then 2^exp < ...
13 years, 7 months ago (2011-12-19 20:30:19 UTC) #2
remyoudompheng
http://codereview.appspot.com/5494060/diff/1002/src/pkg/strconv/ftoa.go File src/pkg/strconv/ftoa.go (right): http://codereview.appspot.com/5494060/diff/1002/src/pkg/strconv/ftoa.go#newcode189 src/pkg/strconv/ftoa.go:189: // If d is not denormal, then 2^exp < ...
13 years, 7 months ago (2011-12-19 20:59:56 UTC) #3
rsc
That reasoning looks good to me. Please put it in a comment. Thanks! Russ
13 years, 7 months ago (2011-12-19 21:07:45 UTC) #4
remyoudompheng
On 2011/12/19 Russ Cox <rsc@golang.org> wrote: > That reasoning looks good to me. > Please ...
13 years, 7 months ago (2011-12-19 21:48:13 UTC) #5
remyoudompheng
Hello rsc@golang.org (cc: golang-dev@googlegroups.com, remy@archlinux.org), Please take another look.
13 years, 7 months ago (2011-12-19 22:09:43 UTC) #6
rsc
http://codereview.appspot.com/5494060/diff/3004/src/pkg/strconv/ftoa.go File src/pkg/strconv/ftoa.go (right): http://codereview.appspot.com/5494060/diff/3004/src/pkg/strconv/ftoa.go#newcode201 src/pkg/strconv/ftoa.go:201: // will suffice. For example, 2^-52 is about 2.22e-16, ...
13 years, 6 months ago (2012-01-10 20:37:01 UTC) #7
remyoudompheng
On 2012/01/10 20:37:01, rsc wrote: > http://codereview.appspot.com/5494060/diff/3004/src/pkg/strconv/ftoa.go > File src/pkg/strconv/ftoa.go (right): > > http://codereview.appspot.com/5494060/diff/3004/src/pkg/strconv/ftoa.go#newcode201 > ...
13 years, 6 months ago (2012-01-10 21:20:38 UTC) #8
rsc
http://codereview.appspot.com/5494060/diff/3004/src/pkg/strconv/ftoa.go File src/pkg/strconv/ftoa.go (right): http://codereview.appspot.com/5494060/diff/3004/src/pkg/strconv/ftoa.go#newcode197 src/pkg/strconv/ftoa.go:197: // Since already 10^dp > 2^exp, it is enough ...
13 years, 6 months ago (2012-01-12 05:35:39 UTC) #9
remyoudompheng
Hello rsc@golang.org (cc: golang-dev@googlegroups.com, remy@archlinux.org), Please take another look.
13 years, 6 months ago (2012-01-12 19:27:07 UTC) #10
rsc
LGTM
13 years, 6 months ago (2012-01-12 19:31:45 UTC) #11
rsc
13 years, 6 months ago (2012-01-12 19:34:08 UTC) #12
*** Submitted as aa208a81cc08 ***

strconv: implement fast path for rounding already short numbers.

benchmark                   old ns/op   new ns/op   delta
BenchmarkFormatFloatDecimal      3765        1386    -63%

R=rsc
CC=golang-dev, remy
http://codereview.appspot.com/5494060

Committer: Russ Cox <rsc@golang.org>
Sign in to reply to this message.

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