Age | Commit message (Collapse) | Author | Files | Lines |
|
Roughly 33% faster for simple cases, probably more for complex ones.
Before:
mallocs per Sprintf(""): 4
mallocs per Sprintf("xxx"): 6
mallocs per Sprintf("%x"): 10
mallocs per Sprintf("%x %x"): 12
Now:
mallocs per Sprintf(""): 2
mallocs per Sprintf("xxx"): 3
mallocs per Sprintf("%x"): 5
mallocs per Sprintf("%x %x"): 7
Speed improves because of avoiding mallocs and also by sharing a bytes.Buffer
between print.go and format.go rather than copying the data back after each
printed item.
Before:
fmt_test.BenchmarkSprintfEmpty 1000000 1346 ns/op
fmt_test.BenchmarkSprintfString 500000 3461 ns/op
fmt_test.BenchmarkSprintfInt 500000 3671 ns/op
Now:
fmt_test.BenchmarkSprintfEmpty 2000000 995 ns/op
fmt_test.BenchmarkSprintfString 1000000 2745 ns/op
fmt_test.BenchmarkSprintfInt 1000000 2391 ns/op
fmt_test.BenchmarkSprintfIntInt 500000 3751 ns/op
I believe there is more to get but this is a good milestone.
R=rsc
CC=golang-dev, hong
http://codereview.appspot.com/166076
|
|
R=rsc
http://codereview.appspot.com/164090
|
|
R=rsc, r, r1
http://codereview.appspot.com/160046
Committer: Russ Cox <rsc@golang.org>
|
|
the bash scripts and makefiles for building go didn't take into account
the fact $GOROOT / $GOBIN could both be directories containing whitespaces,
and was not possible to build it in such a situation.
this commit adjusts the various makefiles/scripts to make it aware of that
possibility, and now it builds successfully when using a path with whitespaces
as well.
Fixes issue 115.
R=rsc, dsymonds1
http://codereview.appspot.com/157067
Committer: Russ Cox <rsc@golang.org>
|
|
R=r, gri
CC=golang-dev
http://codereview.appspot.com/156115
|
|
fix %E: was same as %e.
add tests.
Fixes issue 278.
R=rsc
CC=golang-dev
http://codereview.appspot.com/157111
|
|
threw in an embedded one for good measure.
R=rsc
CC=golang-dev
http://codereview.appspot.com/157058
|
|
rsc's algorithm
- applied gofmt -w misc src
- partial CL (remaining files in other CLs)
R=rsc, r
http://go/go-review/1026036
|
|
R=rsc, r
http://go/go-review/1025029
|
|
- enabled for function declarations (not just function literals)
- applied gofmt -w $GOROOT/src
(look for instance at src/pkg/debug/elf/elf.go)
R=r, rsc
CC=go-dev
http://go/go-review/1026006
|
|
(replacement for CLs 1017039, 1017041, 1017040, 1018054)
R=r
http://go/go-review/1018060
|
|
R=gri
OCL=35485
CL=35488
|
|
R=gri
DELTA=456 (6 added, 3 deleted, 447 changed)
OCL=35398
CL=35406
|
|
R=r
OCL=34731
CL=34731
|
|
the last round omitted := range and only
checked 1 out of N vars in a multi-var :=
R=r
OCL=34624
CL=34638
|
|
R=r
DELTA=166 (0 added, 0 deleted, 166 changed)
OCL=34521
CL=34527
|
|
%E - upper case %e
%G - upper case %g
%#v - Go syntax
R=r
DELTA=332 (238 added, 47 deleted, 47 changed)
OCL=34091
CL=34145
|
|
for its format
Printf("%s", 2) gives %s(int=2)
R=rsc
DELTA=12 (10 added, 0 deleted, 2 changed)
OCL=34042
CL=34044
|
|
whole-package compilation. new Makefiles,
tests now in separate package
bytes
flag
fmt
io
math
once
os
reflect
strconv
sync
time
utf8
delete import "xxx" in package xxx.
inside package xxx, xxx is not declared
anymore so s/xxx.//g
delete file and package level forward declarations.
note the new internal_test.go and sync
and strconv to provide public access to
internals during testing. the installed version
of the package omits that file and thus does
not open the internals to all clients.
R=r
OCL=33065
CL=33097
|
|
R=r
DELTA=95 (0 added, 0 deleted, 95 changed)
OCL=33012
CL=33012
|
|
R=rsc
DELTA=19 (18 added, 0 deleted, 1 changed)
OCL=32656
CL=32670
|
|
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=32591
CL=32593
|
|
R=rsc
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=32540
CL=32545
|
|
rename map access methods to Elem, SetElem.
R=r
DELTA=95 (66 added, 7 deleted, 22 changed)
OCL=31456
CL=31469
|
|
R=rsc
DELTA=57 (39 added, 3 deleted, 15 changed)
OCL=31424
CL=31430
|
|
R=r
DELTA=208 (37 added, 63 deleted, 108 changed)
OCL=31111
CL=31281
|
|
io.ByteBuffer -> bytes.Buffer
left io.ByteBuffer stub around for now,
for protocol compiler.
R=r
OCL=30861
CL=30872
|
|
R=rsc
DELTA=9 (0 added, 0 deleted, 9 changed)
OCL=30658
CL=30658
|
|
R=rsc
DELTA=61 (48 added, 0 deleted, 13 changed)
OCL=30616
CL=30619
|
|
in cap, len, [], and range on maps, strings, and slices.
R=r
DELTA=57 (2 added, 12 deleted, 43 changed)
OCL=30549
CL=30590
|
|
tests: all.bash passes, gobuild still works, godoc still works.
R=rsc
OCL=30096
CL=30102
|