• Josh Bleecher Snyder's avatar
    cmd/compile: search for remaining WB ops from end to beginning · 85b2940f
    Josh Bleecher Snyder authored
    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: 's avatarCherry Zhang <cherryyz@google.com>
    85b2940f
Name
Last commit
Last update
..
addr2line Loading commit data...
api Loading commit data...
asm Loading commit data...
cgo Loading commit data...
compile Loading commit data...
cover Loading commit data...
dist Loading commit data...
doc Loading commit data...
fix Loading commit data...
go Loading commit data...
gofmt Loading commit data...
internal Loading commit data...
link Loading commit data...
nm Loading commit data...
objdump Loading commit data...
pack Loading commit data...
pprof Loading commit data...
trace Loading commit data...
vendor Loading commit data...
vet Loading commit data...