Make dump_{alloc,allocs,local}() no-ops when tracing is disabled.#50246
Merged
bors merged 1 commit intorust-lang:masterfrom Apr 27, 2018
Merged
Make dump_{alloc,allocs,local}() no-ops when tracing is disabled.#50246bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
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.
Contributor
|
r? @cramertj (rust_highfive has picked a reviewer for you, use r? to override) |
Member
|
@bors r+ |
Collaborator
|
📌 Commit 2e4f66a has been approved by |
kennytm
added a commit
to kennytm/rust
that referenced
this pull request
Apr 27, 2018
…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%
```
bors
added a commit
that referenced
this pull request
Apr 27, 2018
Rollup of 7 pull requests Successful merges: - #49707 (Add "the Rustc book") - #50222 (Bump bootstrap compiler to 2018-04-24) - #50227 (Fix ICE with erroneous `impl Trait` in a trait impl) - #50229 (Add setting to go to item if there is only one result) - #50231 (Add more doc aliases) - #50246 (Make dump_{alloc,allocs,local}() no-ops when tracing is disabled.) - #49894 (Rename InternedString to LocalInternedString and introduce a new thread-safe InternedString) Failed merges:
Member
|
cc @oli-obk |
This was referenced Apr 16, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.