The longest numbers we have to represent are the smallest denormals.
Their decimal mantissa is not longer than 5^1100. Taking into
account some extra size for in-place operations, 800 digits are
enough. This saves time used for zero intiialization of extra
bytes.
old ns/op new ns/op delta
strconv_test.BenchmarkAtof64Decimal 521 334 -35.9%
strconv_test.BenchmarkAtof64Float 572 391 -31.6%
strconv_test.BenchmarkAtof64FloatExp 10242 10036 -2.0%
strconv_test.BenchmarkAtof64Big 4229 4029 -4.7%
strconv_test.BenchmarkFormatFloatDecimal 1396 934 -33.1%
strconv_test.BenchmarkFormatFloat 4295 3341 -22.2%
strconv_test.BenchmarkFormatFloatExp 12035 11181 -7.1%
strconv_test.BenchmarkFormatFloatBig 4213 3229 -23.4%
strconv_test.BenchmarkAppendFloatDecimal 1031 600 -41.8%
strconv_test.BenchmarkAppendFloat 3971 3044 -23.3%
strconv_test.BenchmarkAppendFloatExp 11699 11003 -5.9%
strconv_test.BenchmarkAppendFloatBig 3836 2915 -24.0%
R=golang-dev, bradfitz, rsc
CC=golang-dev, remy
https://golang.org/cl/5491064
This makes decimal a good test
case for the escape analysis.
With escape analysis:
benchmark old ns/op new ns/op delta
BenchmarkAtof64Decimal 1954 243 -87.56%
BenchmarkAtof64Float 2008 293 -85.41%
BenchmarkAtof64FloatExp 10106 8814 -12.78%
BenchmarkAtof64Big 5113 3486 -31.82%
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4861042
- gofmt -w src misc
- improves several lists and fixes minor degradation introduced
with the fix for issue 628
- removed some dead code (stringList)
R=rsc
CC=golang-dev
https://golang.org/cl/223058
parsing and printing to new syntax.
Use -oldparser to parse the old syntax,
use -oldprinter to print the old syntax.
2) Change default gofmt formatting settings
to use tabs for indentation only and to use
spaces for alignment. This will make the code
alignment insensitive to an editor's tabwidth.
Use -spaces=false to use tabs for alignment.
3) Manually changed src/exp/parser/parser_test.go
so that it doesn't try to parse the parser's
source files using the old syntax (they have
new syntax now).
4) gofmt -w src misc test/bench
4th set of files.
R=rsc
CC=golang-dev
https://golang.org/cl/180049
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