Commit 78b96db
committed
[dev.link] cmd/link: reuse slice memory in deadcode pass
Reuse slice memory in the deadcode pass, reduce allocations.
Linking cmd/compile,
name old alloc/op new alloc/op delta
Deadcode_GC 2.10MB ± 0% 1.41MB ± 0% -32.61% (p=0.008 n=5+5)
name old allocs/op new allocs/op delta
Deadcode_GC 8.46k ± 0% 5.55k ± 0% -34.45% (p=0.008 n=5+5)
Change-Id: Ib9ba0928d68a65879007218697712b53acd3c5c5
Reviewed-on: https://go-review.googlesource.com/c/go/+/236566
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>1 parent 7179e42 commit 78b96db
1 file changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
92 | 94 | | |
93 | 95 | | |
94 | 96 | | |
| 97 | + | |
95 | 98 | | |
96 | 99 | | |
97 | 100 | | |
| |||
112 | 115 | | |
113 | 116 | | |
114 | 117 | | |
115 | | - | |
| 118 | + | |
116 | 119 | | |
117 | 120 | | |
118 | 121 | | |
| |||
330 | 333 | | |
331 | 334 | | |
332 | 335 | | |
333 | | - | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
334 | 340 | | |
335 | 341 | | |
336 | 342 | | |
| |||
0 commit comments