mirror of https://github.com/golang/go.git
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.go | ||
| atob_test.go | ||
| atof.go | ||
| atof_test.go | ||
| atoi.go | ||
| atoi_test.go | ||
| decimal.go | ||
| decimal_test.go | ||
| extfloat.go | ||
| fp_test.go | ||
| ftoa.go | ||
| ftoa_test.go | ||
| internal_test.go | ||
| isprint.go | ||
| itoa.go | ||
| itoa_test.go | ||
| makeisprint.go | ||
| quote.go | ||
| quote_example_test.go | ||
| quote_test.go | ||
| strconv_test.go | ||