mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: reduce allocations in prove by reusing posets
In prove, reuse posets between different functions by storing them in the per-worker cache. Allocation count regression caused by prove improvements is down from 5% to 3% after this CL. Updates #25179 Change-Id: I6d14003109833d9b3ef5165fdea00aa9c9e952e8 Reviewed-on: https://go-review.googlesource.com/110455 Run-TryBot: Giovanni Bajo <rasky@develer.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
parent
67656ba71b
commit
3c8545c5f6
5 changed files with 48 additions and 11 deletions
|
|
@ -64,7 +64,8 @@ func testPosetOps(t *testing.T, unsigned bool, ops []posetTestOp) {
|
|||
}
|
||||
}
|
||||
|
||||
po := newPoset(unsigned)
|
||||
po := newPoset()
|
||||
po.SetUnsigned(unsigned)
|
||||
for idx, op := range ops {
|
||||
t.Logf("op%d%v", idx, op)
|
||||
switch op.typ {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue