Commit f1a4c10
committed
Rollup merge of rust-lang#50246 - nnethercote:no-dump_allocs, r=Mark-Simulacrum
Make dump_{alloc,allocs,local}() no-ops when tracing is disabled.
Because they traverse data structures and build up strings, which is
wasted effort if those strings aren't printed.
The patch also removes some now-unnecessary log_enabled! tests at call
sites.
This is a big win for the Debug and Opt runs of coercions, tuple-stress, html5ever, and encoding.
```
coercions-opt
avg: -7.8% min: -14.8% max: 0.1%
coercions
avg: -8.0% min: -12.8% max: 0.1%
tuple-stress
avg: -7.2% min: -10.8% max: -0.7%
tuple-stress-opt
avg: -6.9% min: -10.7% max: 0.6%
html5ever
avg: -4.6% min: -7.3% max: -0.3%
encoding
avg: -2.4% min: -4.5% max: 0.1%
html5ever-opt
avg: -2.7% min: -4.2% max: -0.2%
encoding-opt
avg: -1.4% min: -2.4% max: 0.0%
```File tree
3 files changed
+11
-6
lines changed- src/librustc_mir/interpret
3 files changed
+11
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
768 | 768 | | |
769 | 769 | | |
770 | 770 | | |
771 | | - | |
772 | | - | |
773 | | - | |
| 771 | + | |
774 | 772 | | |
775 | 773 | | |
776 | 774 | | |
| |||
1572 | 1570 | | |
1573 | 1571 | | |
1574 | 1572 | | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
1575 | 1576 | | |
1576 | 1577 | | |
1577 | 1578 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
337 | 340 | | |
338 | 341 | | |
339 | 342 | | |
340 | 343 | | |
341 | 344 | | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
342 | 348 | | |
343 | 349 | | |
344 | 350 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
223 | | - | |
224 | | - | |
| 222 | + | |
225 | 223 | | |
226 | 224 | | |
227 | 225 | | |
| |||
0 commit comments