[go] cmd/compile: reuse escape walkOne queue

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Aug 14, 2026, 10:53:46 PM (2 days ago) Aug 14
to Jake Bailey, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Dmitri Shuralyov, Dmitri Shuralyov, Keith Randall, Keith Randall, golang...@luci-project-accounts.iam.gserviceaccount.com, t hepudds, Mateusz Poliwczak, golang-co...@googlegroups.com

Gopher Robot submitted the change

Change information

Commit message:
cmd/compile: reuse escape walkOne queue

Reuse a single temporary queue across escape analysis walkOne calls in a
batch. The queue can grow very large for packages with a large mutual
escape-analysis batch. Allocating a fresh queue for each root creates a
large amount of short-lived allocation.

For github.com/microsoft/typescript-go/internal/checker, ten interleaved
runs compared with master show:

metric before after change
wall time 10.42s 10.23s -1.79%
user time 29.81s 27.70s -7.08%
alloc bytes 3.074 GiB 2.188 GiB -28.82%
allocs 31.68M 31.48M -0.64%
max RSS 1.121 GB 1.102 GB ~
Change-Id: Iefc136c7cdbbdb7641406e70f9a8430a1ff8e86e
Reviewed-by: Keith Randall <k...@golang.org>
Auto-Submit: Keith Randall <k...@golang.org>
Reviewed-by: Dmitri Shuralyov <dmit...@google.com>
Reviewed-by: Keith Randall <k...@google.com>
Files:
  • M src/cmd/compile/internal/escape/solve.go
Change size: S
Delta: 1 file changed, 10 insertions(+), 3 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Iefc136c7cdbbdb7641406e70f9a8430a1ff8e86e
Gerrit-Change-Number: 802541
Gerrit-PatchSet: 4
Gerrit-Owner: Jake Bailey <jacob.b...@gmail.com>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@google.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Jake Bailey <jacob.b...@gmail.com>
Gerrit-Reviewer: Keith Randall <k...@golang.org>
Gerrit-Reviewer: Keith Randall <k...@google.com>
Gerrit-Reviewer: Mateusz Poliwczak <mpoliw...@gmail.com>
Gerrit-Reviewer: t hepudds <thepud...@gmail.com>
Gerrit-CC: Dmitri Shuralyov <dmit...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages