1
0
mirror of https://github.com/golang/go synced 2024-11-17 05:54:46 -07:00
go/misc/cgo/test
Ilya Tocar 91102bf723 runtime: use bytes.IndexByte in findnull
bytes.IndexByte is heavily optimized. Use it in findnull.
This is second attempt, similar to CL97523.
In this version we never call IndexByte on region of memory,
that crosses page boundary. A bit slower than CL97523,
but still fast:

name        old time/op  new time/op  delta
GoString-6   164ns ± 2%   118ns ± 0%  -28.00%  (p=0.000 n=10+6)

findnull is also used in gostringnocopy,
which is used in many hot spots in the runtime.

Fixes #23830

Change-Id: Id843dd4f65a34309d92bdd8df229e484d26b0cb2
Reviewed-on: https://go-review.googlesource.com/98015
Run-TryBot: Ilya Tocar <ilya.tocar@intel.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-03-09 19:37:39 +00:00
..
gcc68255
issue8756
issue8828
issue9026
issue9400 runtime: use NOFRAME on mips and mips64 2018-02-12 21:41:32 +00:00
issue9510a
issue9510b
issue20266 go/build: make -I/-L options in cgo flags absolute 2017-06-13 18:36:04 +00:00
align.go
api.go
backdoor.go
basic.go runtime: use bytes.IndexByte in findnull 2018-03-09 19:37:39 +00:00
buildid_linux.go misc/cgo/test: avoid endless loop when we can't parse notes 2018-01-11 19:55:49 +00:00
callback_c_gc.c
callback_c_gccgo.c
callback_c.c
callback.go
cflags.go
cgo_linux_test.go
cgo_stubs_android_test.go
cgo_test.go runtime: use bytes.IndexByte in findnull 2018-03-09 19:37:39 +00:00
cgo_thread_lock.go
cgo_unix_test.go
checkconst.go
complex.go
cthread_unix.c
cthread_windows.c
cthread.go
duplicate_symbol.go
env.go
exports.go
fpvar.go
gcc68255.go
helpers.go
issue1222.go
issue1328.go
issue1560.go
issue1635.go
issue2462.go
issue3250.go
issue3250w.go
issue3261.go
issue3729.go
issue3729w.go
issue3741.go
issue3775.go
issue3945.go
issue4029.c misc/cgo/test: get uintptr, not pointer, from dlopen 2018-02-02 18:42:10 +00:00
issue4029.go misc/cgo/test: get uintptr, not pointer, from dlopen 2018-02-02 18:42:10 +00:00
issue4029w.go
issue4054a.go
issue4054b.go
issue4273.c
issue4273b.c
issue4339.c
issue4339.go
issue4339.h
issue4417.go
issue4857.go
issue5227.go
issue5242.go
issue5337.go
issue5337w.go
issue5548_c.c
issue5548.go
issue5603.go
issue5740.go
issue5740a.c
issue5740b.c
issue5986.go
issue6128.go
issue6390.go
issue6472.go
issue6506.go
issue6612.go
issue6833_c.c
issue6833.go
issue6907.go cmd/cgo: permit passing string values directly between Go and C 2017-11-15 03:36:54 +00:00
issue6907export_c.c cmd/cgo: permit passing string values directly between Go and C 2017-11-15 03:36:54 +00:00
issue6907export.go cmd/cgo: permit passing string values directly between Go and C 2017-11-15 03:36:54 +00:00
issue6997_linux.c
issue6997_linux.go
issue7234_test.go
issue7560.go
issue7665.go
issue7786.go
issue7978.go misc/cgo/test: set the traceback level instead of failing the test 2017-09-13 02:53:11 +00:00
issue8092.go
issue8148.go
issue8331.h
issue8331a.go
issue8331b.go
issue8428.go
issue8441.go
issue8517_windows.c
issue8517_windows.go
issue8517.go
issue8694.go
issue8756.go
issue8811.c
issue8811.go
issue8828.go
issue8945.go
issue9026.go
issue9400_linux.go
issue9510.go
issue9557.go
issue10303.go
issue11925.go
issue12030.go
issue13402.go
issue13930.go
issue14838.go
issue17065.go
issue17537.go
issue18126.go
issue18146.go
issue18720.go cmd/cgo: support niladic function-like macros 2017-08-30 18:28:58 +00:00
issue20129.go cmd/cgo: unwrap typedef-chains before type checking 2017-06-27 23:02:34 +00:00
issue20266.go go/build: make -I/-L options in cgo flags absolute 2017-06-13 18:36:04 +00:00
issue20369.go
issue20910.c cmd/cgo: unify cgo output for gc and gccgo 2017-08-16 21:57:56 +00:00
issue20910.go cmd/cgo: unify cgo output for gc and gccgo 2017-08-16 21:57:56 +00:00
issue21668.go cmd/cgo: avoid using common names for sniffing 2017-08-29 00:42:34 +00:00
issue21708.go cmd/cgo: support large unsigned macro again 2017-09-01 00:42:21 +00:00
issue21809.go go/printer: fix formatting of three-index slice expression 2017-10-03 16:16:30 +00:00
issue21897.go cmd/cgo: special case C ptr types to use uintptr 2017-11-17 22:11:03 +00:00
issue21897b.go cmd/cgo: special case C ptr types to use uintptr 2017-11-17 22:11:03 +00:00
issue22958.go cmd/cgo: for C bitfields use only valid Go integer types 2017-12-01 23:50:23 +00:00
issue24206_generic.go runtime: use bytes.IndexByte in findnull 2018-03-09 19:37:39 +00:00
issue24206.go runtime: use bytes.IndexByte in findnull 2018-03-09 19:37:39 +00:00
setgid_linux.go
sigaltstack.go
sigprocmask.c
sigprocmask.go
test22906.go cmd/cgo: make JNI's jobject type map to uintptr in Go 2017-12-08 16:13:14 +00:00