1
0
mirror of https://github.com/golang/go synced 2024-11-14 08:40:27 -07:00
go/src/cmd
Josh Bleecher Snyder 85b2940f5c cmd/compile: search for remaining WB ops from end to beginning
The writebarrier pass processes WB ops from beginning to end,
replacing them by other values.
But it also checks whether there are more ops to process
by walking from beginning to end.
This is quadratic, so walk from end to beginning instead.

This speeds up compiling the code in issue 13554:

name  old time/op       new time/op       delta
Pkg         11.9s ± 2%         8.3s ± 3%  -29.88%  (p=0.000 n=18+17)

Updates #13554

Passes toolstash-check.

Change-Id: I5f8a872ddc4b783540220d89ea2ee188a6d2b2ff
Reviewed-on: https://go-review.googlesource.com/43571
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2017-05-18 20:14:12 +00:00
..
addr2line cmd/go: build test binaries with -s in addition to -w 2017-03-29 17:18:16 +00:00
api api: promote next.txt to go1.8.txt, update go tool 2016-12-01 02:54:21 +00:00
asm cmd/internal/obj/arm: remove illegal form of the SWI instruction 2017-05-18 13:38:13 +00:00
cgo cmd/cgo: support large unsigned macros 2017-05-17 14:42:29 +00:00
compile cmd/compile: search for remaining WB ops from end to beginning 2017-05-18 20:14:12 +00:00
cover cmd/cover: fix spelling mistake 2016-12-20 04:45:25 +00:00
dist internal/cpu: new package to detect cpu features 2017-05-10 17:02:21 +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: don't fail on missing runtime/internal/sys/zversion.go 2017-05-17 01:30:51 +00:00
gofmt cmd/fix,cmd/gofmt: flush to disk before diffing 2017-03-30 18:19:57 +00:00
internal cmd/internal/obj/arm: remove illegal form of the SWI instruction 2017-05-18 13:38:13 +00:00
link cmd/link: make sure that runtime.epclntab lives in .text section 2017-05-18 05:32:41 +00:00
nm all: fix some printf format strings 2017-02-14 02:09:30 +00:00
objdump cmd/internal/objabi: fix the bug of shrinking SymType down to a uint8 2017-05-16 12:26:10 +00:00
pack all: use testing.GoToolPath instead of "go" 2016-08-30 22:49:11 +00:00
pprof cmd/pprof: update README to explain relationship with github.com/google/pprof 2017-04-10 19:51:01 +00:00
trace cmd/trace: document that trace viewer is only tested on chromium 2017-04-20 16:44:55 +00:00
vendor cmd/vendor/arch/x86: pull new version from x repo 2017-04-20 22:39:48 +00:00
vet internal/cpu: new package to detect cpu features 2017-05-10 17:02:21 +00:00