go/src
David Crawshaw 3c6ed76da2 reflect: avoid lock for some NumMethod()==0 cases
The encoding/json package uses NumMethod()==0 as a fast check for
interface satisfaction. In the case when a type has no methods at
all, we don't need to grab the RWMutex.

Improves JSON decoding benchmark on linux/amd64:

	name           old time/op    new time/op    delta
	CodeDecoder-8    44.2ms ± 2%    40.6ms ± 1%  -8.11%  (p=0.000 n=10+10)

	name           old speed      new speed      delta
	CodeDecoder-8  43.9MB/s ± 2%  47.8MB/s ± 1%  +8.82%  (p=0.000 n=10+10)

For #16117

Change-Id: Id717e7fcd2f41b7d51d50c26ac167af45bae3747
Reviewed-on: https://go-review.googlesource.com/24433
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-06-24 18:01:08 +00:00
..
archive archive/zip: use HTTPS for documentation link 2016-05-14 17:27:44 +00:00
bufio all: use SeekStart, SeekCurrent, SeekEnd 2016-05-06 00:10:41 +00:00
builtin
bytes bytes: use Run method for benchmarks 2016-06-03 07:03:03 +00:00
cmd cmd/compile, etc: bring back ptrToThis 2016-06-23 17:39:38 +00:00
compress compress/flate: use seperate const block for exported constants 2016-05-31 18:28:44 +00:00
container all: fixed a handful of typos 2016-05-24 21:18:03 +00:00
context context: document how to release resources associated with Contexts. 2016-06-15 00:30:46 +00:00
crypto crypto/x509: don't ignore asn1.Marshal error 2016-06-14 05:17:57 +00:00
database/sql database/sql: clone data for named []byte types 2016-04-30 18:40:36 +00:00
debug debug/pe: handle files with no string table 2016-06-19 05:18:09 +00:00
encoding encoding/csv: update doc about comments whitespace 2016-06-10 01:00:09 +00:00
errors
expvar expvar: slightly expand documentation for Var's String method 2016-05-19 04:20:47 +00:00
flag flag: recognize "0s" as the zero value for a flag.Duration 2016-05-31 23:45:47 +00:00
fmt fmt: remove extra space in too few arguments example 2016-05-12 20:45:48 +00:00
go go/ast: fix comments misinterpreted as documentation 2016-06-15 20:40:38 +00:00
hash hash/crc64: Use slicing by 8. 2016-05-18 14:38:04 +00:00
html html/template: update security model link 2016-06-23 04:30:07 +00:00
image image/gif: accept an out-of-bounds transparent color index. 2016-04-29 00:01:22 +00:00
index/suffixarray
internal internal/trace: err if binary is not supplied for old trace 2016-06-16 16:22:03 +00:00
io io: use SeekStart, SeekCurrent, and SeekEnd in io.Seeker documentation 2016-05-29 06:52:45 +00:00
log
math math/big: avoid panic in float.Text with negative prec 2016-06-01 19:20:52 +00:00
mime mime/multipart: sort header keys to ensure reproducible output 2016-05-16 22:55:16 +00:00
net net/http: pass through server side Transfer-Encoding headers 2016-06-15 03:10:47 +00:00
os os: fix blockUntilWaitable on freebsd/{386,arm} 2016-06-14 22:39:56 +00:00
path path/filepath: prevent infinite recursion on Windows on UNC input 2016-05-31 00:11:32 +00:00
reflect reflect: avoid lock for some NumMethod()==0 cases 2016-06-24 18:01:08 +00:00
regexp regexp: use Run for benchmark 2016-06-01 10:28:01 +00:00
runtime cmd/compile, etc: bring back ptrToThis 2016-06-23 17:39:38 +00:00
sort
strconv strconv: use Run for some benchmarks 2016-06-02 20:47:29 +00:00
strings strings: fix and reenable amd64 Index for 17-31 byte strings 2016-05-27 22:57:32 +00:00
sync sync: document that RWMutex read locks may not be held recursively 2016-05-31 00:22:56 +00:00
syscall syscall: skip TestUnshare if kernel does not support net namespace 2016-06-15 11:41:49 +00:00
testing testing: document that logs are dumped to standard output 2016-06-23 04:31:19 +00:00
text text/template: clarify the default formatting used for values 2016-06-21 02:15:44 +00:00
time time: document that RFC822/1123 don't parse all RFC formats 2016-06-09 15:32:48 +00:00
unicode unicode: improve SimpleFold performance for ascii 2016-04-26 21:59:50 +00:00
unsafe
vendor/golang.org/x/net vendor: update vendored route 2016-06-02 00:59:46 +00:00
Make.dist
all.bash
all.bat
all.rc
androidtest.bash all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
bootstrap.bash all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
buildall.bash
clean.bash
clean.bat
clean.rc
cmp.bash cmd/compile: switch to compact export format by default 2016-04-27 16:59:55 +00:00
iostest.bash
make.bash build: unset GOBIN during build 2016-05-19 18:40:53 +00:00
make.bat build: unset GOBIN during build 2016-05-19 18:40:53 +00:00
make.rc build: unset GOBIN during build 2016-05-19 18:40:53 +00:00
naclmake.bash src: split nacltest.bash into naclmake.bash and keep nacltest.bash 2016-04-12 02:03:34 +00:00
nacltest.bash all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
race.bash
race.bat
run.bash build: unset GOBIN during build 2016-05-19 18:40:53 +00:00
run.bat build: unset GOBIN during build 2016-05-19 18:40:53 +00:00
run.rc build: unset GOBIN during build 2016-05-19 18:40:53 +00:00