1
0
mirror of https://github.com/golang/go synced 2024-11-20 08:34:41 -07:00
go/src
Robert Griesemer 4e0618c992 math/big: permit internal nat.scan to accept decimal point
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>
2015-01-20 22:57:39 +00:00
..
archive archive/tar: document Reader.Next's behavior at the end 2014-12-30 21:38:37 +00:00
bufio bufio: add Reader.Discard 2015-01-07 06:37:57 +00:00
builtin
bytes all: update old comments referencing *.goc files 2015-01-15 16:31:52 +00:00
cmd cmd/gc: don't unpack struct arguments to append 2015-01-20 22:55:56 +00:00
compress compress/bzip2: s/repeat_power/repeatPower/ 2014-12-19 01:29:00 +00:00
container
crypto crypto/x509: write exact BitLength in ASN.1 encoding for certificate KeyUsage 2015-01-15 01:58:54 +00:00
database/sql database/sql: Remove unnecessary call to maybeOpenNewConnections 2014-12-24 02:39:12 +00:00
debug all: power64 is now ppc64 2014-12-05 19:13:20 -05:00
encoding encoding/xml: remove unnecessary memory allocation in Unmarshal 2015-01-15 08:45:15 +00:00
errors
expvar
flag flag: Check for Set error 2014-12-22 00:17:07 +00:00
fmt fmt: reword the document for [n]. 2015-01-19 06:35:21 +00:00
go cmd/cgo, go/build: finish a cleanup TODO 2015-01-08 00:59:37 +00:00
hash all: power64 is now ppc64 2014-12-05 19:13:20 -05:00
html html/template: fix build after encoding/js escaping change 2014-10-28 10:18:44 +11:00
image image/draw: fold TestClipWithNilMP into TestClip. 2015-01-14 06:04:13 +00:00
index/suffixarray
internal/syscall
io
lib9
libbio
liblink liblink: adjustments for c2go conversion 2015-01-14 19:18:05 +00:00
log log: add global Output function 2015-01-12 04:45:38 +00:00
math math/big: permit internal nat.scan to accept decimal point 2015-01-20 22:57:39 +00:00
mime mime/multipart: moved some code to mime/internal/quotedprintable 2014-12-23 19:30:02 +00:00
net net/http/fcgi: Fix resource leaks 2015-01-19 22:54:54 +00:00
os os: replace itod on posix with general itoa and fix possible infinite recursion 2015-01-02 16:21:18 +00:00
path path/filepath: remove named result parameter for VolumeName 2014-12-18 16:05:07 +00:00
reflect reflect: remove extra word in comment 2015-01-13 18:55:15 +00:00
regexp regexp: fix typo in comment: s/onpass/onepass/ 2014-12-24 07:30:28 +00:00
runtime runtime: Add some diagnostic messages printing source of unmarked object 2015-01-20 19:58:22 +00:00
sort sort: reduce number of comparisons needed by medianOfThree 2015-01-13 19:37:02 +00:00
strconv strconv: speed up atoi for common cases 2015-01-08 20:58:26 +00:00
strings strings: remove overengineered Compare implementation 2015-01-19 02:19:17 +00:00
sync sync/atomic: remove atomic pointer hammer tests 2015-01-06 00:28:22 +00:00
syscall runtime, syscall: use SYSCALL instruction on FreeBSD. 2015-01-18 23:51:50 +00:00
testing testing/iotest: fix copy/paste error in comment 2014-12-29 19:05:37 +00:00
text text/template: fix bug in pipelined variadics 2014-10-18 11:22:05 -07:00
time time: correctly parse large input durations and avoid precision loss 2015-01-15 00:15:58 +00:00
unicode
unsafe unsafe: document that unsafe programs are not protected 2014-10-24 09:37:25 -07:00
all.bash
all.bat
all.rc
androidtest.bash build: androidtest.bash has to use copy for files to adb-sync. 2015-01-15 13:53:03 +00:00
clean.bash
clean.bat
clean.rc
make.bash [dev.cc] build: do not pass GOHOSTOS and GOHOSTARCH to Go 1.4 build 2015-01-14 20:17:20 +00:00
make.bat [dev.cc] build: do not pass GOHOSTOS and GOHOSTARCH to Go 1.4 build 2015-01-14 20:17:20 +00:00
Make.dist
make.rc [dev.cc] build: do not pass GOHOSTOS and GOHOSTARCH to Go 1.4 build 2015-01-14 20:17:20 +00:00
nacltest.bash
race.bash
race.bat
run.bash cmd/cgo: remove obsolete -cdefs flag 2015-01-07 22:49:59 +00:00
run.bat build: change all.bash output to be more markdown-friendly 2014-12-13 00:03:23 +00:00
run.rc build: add GOTESTONLY environment test for Plan 9's run.rc 2015-01-08 04:35:23 +00:00