1
0
mirror of https://github.com/golang/go synced 2024-10-04 22:21:22 -06:00
go/src/pkg/strconv
Russ Cox 0ed5e6a2be strconv: make Ftoa faster
Make code amenable to escape analysis
so that the decimal values do not escape.

benchmark                               old ns/op    new ns/op    delta
strconv_test.BenchmarkAtof64Decimal           229          233   +1.75%
strconv_test.BenchmarkAtof64Float             261          263   +0.77%
strconv_test.BenchmarkAtof64FloatExp         7760         7757   -0.04%
strconv_test.BenchmarkAtof64Big              3086         3053   -1.07%
strconv_test.BenchmarkFtoa64Decimal          6866         2629  -61.71%
strconv_test.BenchmarkFtoa64Float            7211         3064  -57.51%
strconv_test.BenchmarkFtoa64FloatExp        12587         8263  -34.35%
strconv_test.BenchmarkFtoa64Big              7058         2825  -59.97%
json.BenchmarkCodeEncoder               357355200    276528200  -22.62%
json.BenchmarkCodeMarshal               360735200    279646400  -22.48%
json.BenchmarkCodeDecoder               731528600    709460600   -3.02%
json.BenchmarkCodeUnmarshal             754774400    731051200   -3.14%
json.BenchmarkCodeUnmarshalReuse        713379000    704218000   -1.28%
json.BenchmarkSkipValue                  51594300     51682600   +0.17%

benchmark                                old MB/s     new MB/s  speedup
json.BenchmarkCodeEncoder                    5.43         7.02    1.29x
json.BenchmarkCodeMarshal                    5.38         6.94    1.29x
json.BenchmarkCodeDecoder                    2.65         2.74    1.03x
json.BenchmarkCodeUnmarshal                  2.57         2.65    1.03x
json.BenchmarkCodeUnmarshalReuse             2.72         2.76    1.01x
json.BenchmarkSkipValue                     38.61        38.55    1.00x

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5369111
2011-11-15 12:17:25 -05:00
..
atob_test.go src/pkg/[n-z]*: gofix -r error -force=error 2011-11-01 22:05:34 -04:00
atob.go src/pkg/[n-z]*: gofix -r error -force=error 2011-11-01 22:05:34 -04:00
atof_test.go src/pkg/[n-z]*: gofix -r error -force=error 2011-11-01 22:05:34 -04:00
atof.go src/pkg/[n-z]*: gofix -r error -force=error 2011-11-01 22:05:34 -04:00
atoi_test.go src/pkg/[n-z]*: gofix -r error -force=error 2011-11-01 22:05:34 -04:00
atoi.go src/pkg/[n-z]*: gofix -r error -force=error 2011-11-01 22:05:34 -04:00
decimal_test.go strconv: make Ftoa faster 2011-11-15 12:17:25 -05:00
decimal.go strconv: make Ftoa faster 2011-11-15 12:17:25 -05:00
fp_test.go src/pkg/[n-z]*: gofix -r error -force=error 2011-11-01 22:05:34 -04:00
ftoa_test.go strconv: add Ftoa benchmarks 2011-11-15 11:02:04 -05:00
ftoa.go strconv: make Ftoa faster 2011-11-15 12:17:25 -05:00
internal_test.go strconv: make Ftoa faster 2011-11-15 12:17:25 -05:00
itoa_test.go gofmt -s -w src misc 2010-10-22 10:06:33 -07:00
itoa.go strconv.Uitob64: allow conversion of 64-bit binaries (buffer was too small). 2010-07-01 14:44:21 -07:00
Makefile build: no required environment variables 2010-08-18 10:08:49 -04:00
quote_test.go strconv: use better errors than os.EINVAL, os.ERANGE 2011-10-27 19:46:31 -07:00
quote.go renaming_3: gofix -r go1pkgrename src/pkg/[m-z]* 2011-11-08 15:41:54 -08:00
testfp.txt mv src/lib to src/pkg 2009-06-09 09:53:44 -07:00