mirror of
https://github.com/golang/go
synced 2024-11-20 08:34:41 -07:00
4e0618c992
This will simplify parsing of rational and (eventually) floating point numbers. Also streamlined inner loop. As a result, scan runs faster for all but short (<= 10 digit) numbers. For short numbers it is < 10% slower (cause is known and could be addressed in a future CL). Minor unrelated cleanups. Added additional tests. benchmark old ns/op new ns/op delta BenchmarkScanPi 134465 125122 -6.95% BenchmarkScan10Base2 493 540 +9.53% BenchmarkScan100Base2 3608 3244 -10.09% BenchmarkScan1000Base2 35376 32377 -8.48% BenchmarkScan10000Base2 481504 450028 -6.54% BenchmarkScan100000Base2 17936774 17648080 -1.61% BenchmarkScan10Base8 258 280 +8.53% BenchmarkScan100Base8 1389 1323 -4.75% BenchmarkScan1000Base8 14221 13036 -8.33% BenchmarkScan10000Base8 271298 258993 -4.54% BenchmarkScan100000Base8 15715465 15672580 -0.27% BenchmarkScan10Base10 249 268 +7.63% BenchmarkScan100Base10 1324 1220 -7.85% BenchmarkScan1000Base10 13398 12234 -8.69% BenchmarkScan10000Base10 259157 249342 -3.79% BenchmarkScan100000Base10 15670613 15582409 -0.56% BenchmarkScan10Base16 231 251 +8.66% BenchmarkScan100Base16 1093 1065 -2.56% BenchmarkScan1000Base16 12687 12196 -3.87% BenchmarkScan10000Base16 282349 271443 -3.86% BenchmarkScan100000Base16 16742669 16552917 -1.13% Change-Id: I4b9b078792788aef872b307399f00ffd34903127 Reviewed-on: https://go-review.googlesource.com/2960 Reviewed-by: Alan Donovan <adonovan@google.com> |
||
---|---|---|
.. | ||
archive | ||
bufio | ||
builtin | ||
bytes | ||
cmd | ||
compress | ||
container | ||
crypto | ||
database/sql | ||
debug | ||
encoding | ||
errors | ||
expvar | ||
flag | ||
fmt | ||
go | ||
hash | ||
html | ||
image | ||
index/suffixarray | ||
internal/syscall | ||
io | ||
lib9 | ||
libbio | ||
liblink | ||
log | ||
math | ||
mime | ||
net | ||
os | ||
path | ||
reflect | ||
regexp | ||
runtime | ||
sort | ||
strconv | ||
strings | ||
sync | ||
syscall | ||
testing | ||
text | ||
time | ||
unicode | ||
unsafe | ||
all.bash | ||
all.bat | ||
all.rc | ||
androidtest.bash | ||
clean.bash | ||
clean.bat | ||
clean.rc | ||
make.bash | ||
make.bat | ||
Make.dist | ||
make.rc | ||
nacltest.bash | ||
race.bash | ||
race.bat | ||
run.bash | ||
run.bat | ||
run.rc |