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

Issue 7637047: fmt: use sync.Cache (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years ago by dvyukov
Modified:
10 years, 2 months ago
Reviewers:
bradfitz
Visibility:
Public.

Description

fmt: use sync.Cache benchmark old ns/op new ns/op delta BenchmarkSprintfInt 363 368 +1.38% BenchmarkSprintfInt-2 457 249 -45.51% BenchmarkSprintfInt-4 850 142 -83.29% BenchmarkSprintfInt-8 1220 78 -93.61% BenchmarkSprintfInt-16 1226 58 -95.22% BenchmarkManyArgs 2233 2296 +2.82% BenchmarkManyArgs-2 1255 1316 +4.86% BenchmarkManyArgs-4 1250 714 -42.88% BenchmarkManyArgs-8 1100 429 -61.00% BenchmarkManyArgs-16 1528 361 -76.37%

Patch Set 1 #

Patch Set 2 : diff -r 7778f3df0d19 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 3 : diff -r 7778f3df0d19 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 4 : diff -r 7778f3df0d19 https://dvyukov%40google.com@code.google.com/p/go/ #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -54 lines) Patch
M src/pkg/fmt/fmt_test.go View 1 2 2 chunks +35 lines, -14 lines 1 comment Download
M src/pkg/fmt/print.go View 1 2 chunks +8 lines, -37 lines 2 comments Download
M src/pkg/fmt/scan.go View 1 4 chunks +8 lines, -3 lines 0 comments Download

Messages

Total messages: 2
bradfitz
Nice. https://codereview.appspot.com/7637047/diff/8001/src/pkg/fmt/print.go File src/pkg/fmt/print.go (right): https://codereview.appspot.com/7637047/diff/8001/src/pkg/fmt/print.go#newcode120 src/pkg/fmt/print.go:120: var ppFree sync.Cache // of *pp https://codereview.appspot.com/7637047/diff/8001/src/pkg/fmt/print.go#newcode124 src/pkg/fmt/print.go:124: ...
11 years ago (2013-03-11 00:38:07 UTC) #1
bradfitz
11 years ago (2013-03-11 14:39:02 UTC) #2
https://codereview.appspot.com/7637047/diff/8001/src/pkg/fmt/fmt_test.go
File src/pkg/fmt/fmt_test.go (right):

https://codereview.appspot.com/7637047/diff/8001/src/pkg/fmt/fmt_test.go#newc...
src/pkg/fmt/fmt_test.go:578: buf.Reset()
Why are you calling Reset on a bytes.Buffer zero value?  I think you meant to
pass in a pointer to it instead.
Sign in to reply to this message.

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