1
0
mirror of https://github.com/golang/go synced 2024-10-02 08:18:32 -06:00
go/src/strconv
Marvin Stenger 3c0bf181b7 strconv: simplify and optimize Itoa(small)
Use substring of digits for values < 10.

name                 old time/op  new time/op  delta
FormatIntSmall/7-4   4.54ns ± 1%  3.70ns ± 1%  -18.41%  (p=0.000 n=18+17)
FormatIntSmall/42-4  4.54ns ± 1%  4.13ns ± 1%   -9.02%  (p=0.000 n=16+18)

Change-Id: I0b521b563c13ef88aa2701049fa4a43760e884af
Reviewed-on: https://go-review.googlesource.com/111285
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-05-03 18:07:02 +00:00
..
testdata
atob_test.go
atob.go
atof_test.go strconv: apply Brad's review comment 2017-07-17 16:32:05 +00:00
atof.go
atoi_test.go strconv: optimize Atoi for common case 2017-08-25 10:17:39 +00:00
atoi.go strconv: optimize Atoi for common case 2017-08-25 10:17:39 +00:00
decimal_test.go
decimal.go
doc.go strconv: make code formatting more consistent in doc.go 2018-03-19 12:53:16 +00:00
example_test.go
export_test.go strconv: check bitsize range in ParseInt and ParseUint 2017-08-22 13:37:40 +00:00
extfloat.go all: fix article typos 2017-09-15 02:39:16 +00:00
fp_test.go
ftoa_test.go
ftoa.go
internal_test.go
isprint.go all: fix non-standard "DO NOT EDIT" comments for generated files 2018-03-10 17:50:11 +00:00
itoa_test.go strconv: simplify and optimize Itoa(small) 2018-05-03 18:07:02 +00:00
itoa.go strconv: simplify and optimize Itoa(small) 2018-05-03 18:07:02 +00:00
makeisprint.go all: fix non-standard "DO NOT EDIT" comments for generated files 2018-03-10 17:50:11 +00:00
quote_test.go strconv: detect invalid UTF-8 in the Unquote fast path 2018-02-13 18:33:44 +00:00
quote.go strconv: detect invalid UTF-8 in the Unquote fast path 2018-02-13 18:33:44 +00:00
strconv_test.go