1
0
mirror of https://github.com/golang/go synced 2024-11-14 20:20:30 -07:00
go/src/cmd
Keith Randall 5cadc91b3c cmd/compile: intrinsics for math/bits.OnesCount
Popcount instructions on amd64 are not guaranteed to be
present, so we must guard their call.  Rewrite rules can't
generate control flow at the moment, so the intrinsifier
needs to generate that code.

name           old time/op  new time/op  delta
OnesCount-8    2.47ns ± 5%  1.04ns ± 2%  -57.70%  (p=0.000 n=10+10)
OnesCount16-8  1.05ns ± 1%  0.78ns ± 0%  -25.56%    (p=0.000 n=9+8)
OnesCount32-8  1.63ns ± 5%  1.04ns ± 2%  -35.96%  (p=0.000 n=10+10)
OnesCount64-8  2.45ns ± 0%  1.04ns ± 1%  -57.55%   (p=0.000 n=6+10)

Update #18616

Change-Id: I4aff2cc9aa93787898d7b22055fe272a7cf95673
Reviewed-on: https://go-review.googlesource.com/38320
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
2017-04-04 02:40:11 +00:00
..
addr2line cmd/go: build test binaries with -s in addition to -w 2017-03-29 17:18:16 +00:00
api
asm cmd/asm/internal/arch: use generic obj.Rconv function everywhere 2017-03-31 04:29:58 +00:00
cgo
compile cmd/compile: intrinsics for math/bits.OnesCount 2017-04-04 02:40:11 +00:00
cover
dist cmd/go: add -json flag to go env 2017-03-29 06:50:07 +00:00
doc cmd/doc: implement "go doc struct.field" 2017-03-22 05:37:50 +00:00
fix cmd/fix,cmd/gofmt: flush to disk before diffing 2017-03-30 18:19:57 +00:00
go cmd/go: exclude vendored packages from ... matches 2017-03-29 18:51:44 +00:00
gofmt cmd/fix,cmd/gofmt: flush to disk before diffing 2017-03-30 18:19:57 +00:00
internal cmd/internal/obj: use string instead of LSym in Pcln 2017-04-03 15:19:47 +00:00
link cmd/link: canonicalize the "package" of dupok text symbols 2017-04-02 03:25:02 +00:00
nm
objdump cmd/objdump: make test independent of inlining 2017-02-19 21:27:16 +00:00
pack
pprof cmd/pprof: use proxy from environment 2017-03-19 05:45:51 +00:00
trace cmd/trace: traces may end with pending mark assists 2017-03-02 18:33:54 +00:00
vendor cmd/vendor/github.com/google/pprof: refresh from upstream 2017-03-01 21:36:03 +00:00
vet cmd/vet: remove Peek from list of canonical methods 2017-03-27 23:36:36 +00:00