1
0
mirror of https://github.com/golang/go synced 2024-11-19 17:14:44 -07:00
go/src
Martin Möhrmann 63c4284346 strconv: check bitsize range in ParseInt and ParseUint
Return an error when a bitSize below 0 or above 64 is specified.

Move bitSize 0 handling in ParseInt after the call to ParseUint
to avoid a spill.

AMD64:
name       old time/op  new time/op  delta
Atoi       28.9ns ± 6%  27.4ns ± 6%  -5.21%  (p=0.002 n=20+20)
AtoiNeg    24.6ns ± 2%  23.1ns ± 1%  -6.04%  (p=0.000 n=19+18)
Atoi64     38.8ns ± 1%  38.0ns ± 1%  -2.03%  (p=0.000 n=17+20)
Atoi64Neg  35.5ns ± 1%  34.3ns ± 1%  -3.42%  (p=0.000 n=19+20)

Updates #21275

Change-Id: I70f0e4a16fa003f7ea929ca4ef56bd1a4181660b
Reviewed-on: https://go-review.googlesource.com/55139
Reviewed-by: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
2017-08-22 13:37:40 +00:00
..
archive archive/tar: refactor Reader support for sparse files 2017-08-19 00:57:31 +00:00
bufio Revert "bufio: make Reader.Peek invalidate Unreads" 2017-07-06 03:06:44 +00:00
builtin
bytes bytes: clean-up of buffer.go 2017-08-18 17:41:11 +00:00
cmd cmd/internal/obj/arm64: fix assemble movk bug 2017-08-22 13:10:08 +00:00
compress
container
context
crypto crypto/aes: make the GHASH part of AES-GCM faster 2017-08-18 21:40:57 +00:00
database/sql database/sql: fail on unsupported options when context is un-cancellable 2017-08-09 20:06:20 +00:00
debug all: unindent some big chunks of code 2017-08-18 06:59:48 +00:00
encoding encoding/asn1: handle application tag in Marshal 2017-08-15 18:45:39 +00:00
errors
expvar
flag flag: make default Usage prefer CommandLine's output over just os.Stderr 2017-08-08 01:47:47 +00:00
fmt fmt: add Stringer example 2017-08-16 18:02:42 +00:00
go go/doc: classify function returning slice of T as constructor 2017-08-22 08:09:42 +00:00
hash
html html: updated entity spec link 2017-08-08 04:29:35 +00:00
image
index/suffixarray
internal runtime, internal/cpu: CPU capabilities detection for ppc64x 2017-08-14 12:16:42 +00:00
io io/ioutil: add example for ReadFile 2017-07-15 23:28:44 +00:00
log log: adds a Logger Output method Example 2017-07-16 03:57:11 +00:00
math math: implement the erfcinv function 2017-08-22 13:13:20 +00:00
mime
net {net,os/user,plugin}: eliminate unnecessary C round-trips 2017-08-17 18:14:16 +00:00
os {net,os/user,plugin}: eliminate unnecessary C round-trips 2017-08-17 18:14:16 +00:00
path
plugin {net,os/user,plugin}: eliminate unnecessary C round-trips 2017-08-17 18:14:16 +00:00
reflect reflect: remove useless parameter from newName 2017-08-16 15:11:03 +00:00
regexp regexp: example for MatchString function 2017-07-15 21:13:35 +00:00
runtime cmd/compile: pass stack allocated bucket to makemap inside hmap 2017-08-22 06:01:59 +00:00
sort sort: add example for Strings 2017-07-15 23:17:23 +00:00
strconv strconv: check bitsize range in ParseInt and ParseUint 2017-08-22 13:37:40 +00:00
strings strings: use slice instead of list and array in Fields comment 2017-08-14 21:25:53 +00:00
sync sync: delete a sentence from the Map docs 2017-07-21 22:00:47 +00:00
syscall syscall: really use utimensat for UtimesNano on Solaris 2017-08-15 16:56:03 +00:00
testing testing: don't fail all tests after racy test failure 2017-08-15 22:59:26 +00:00
text all: unindent some big chunks of code 2017-08-18 06:59:48 +00:00
time time: fix grammar/spelling errors in test comment 2017-08-21 17:52:45 +00:00
unicode
unsafe
vendor/golang_org/x
all.bash
all.bat
all.rc
androidtest.bash
bootstrap.bash
buildall.bash
clean.bash
clean.bat
clean.rc
cmp.bash
iostest.bash
make.bash
make.bat
Make.dist
make.rc
naclmake.bash
nacltest.bash
race.bash
race.bat
run.bash
run.bat
run.rc