mirror of
https://github.com/golang/go
synced 2024-10-03 14:11:21 -06:00
06ed8f0df7
Add compile time constants for bases 10 and 16 instead of computing the cutoff value on every invocation of ParseUint by a division. Reduce usage of slice operations. amd64: benchmark old ns/op new ns/op delta BenchmarkAtoi 44.6 36.0 -19.28% BenchmarkAtoiNeg 44.2 38.9 -11.99% BenchmarkAtoi64 72.5 56.7 -21.79% BenchmarkAtoi64Neg 66.1 58.6 -11.35% 386: benchmark old ns/op new ns/op delta BenchmarkAtoi 86.6 73.0 -15.70% BenchmarkAtoiNeg 86.6 72.3 -16.51% BenchmarkAtoi64 126 108 -14.29% BenchmarkAtoi64Neg 126 108 -14.29% Change-Id: I0a271132120d776c97bb4ed1099793c73e159893 Reviewed-on: https://go-review.googlesource.com/2460 Reviewed-by: Robert Griesemer <gri@golang.org> |
||
---|---|---|
.. | ||
testdata | ||
atob_test.go | ||
atob.go | ||
atof_test.go | ||
atof.go | ||
atoi_test.go | ||
atoi.go | ||
decimal_test.go | ||
decimal.go | ||
extfloat.go | ||
fp_test.go | ||
ftoa_test.go | ||
ftoa.go | ||
internal_test.go | ||
isprint.go | ||
itoa_test.go | ||
itoa.go | ||
makeisprint.go | ||
quote_example_test.go | ||
quote_test.go | ||
quote.go | ||
strconv_test.go |