about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src/rustdoc.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-02-15 11:57:15 +0000
committerbors <bors@rust-lang.org>2025-02-15 11:57:15 +0000
commit69fd5e4059f8840f09f60269bcda23dcdcb77151 (patch)
treebf0a58e3206d692f4e91a1a6bd53af5999af2607 /compiler/rustc_resolve/src/rustdoc.rs
parent8c07d140e00dfa5b0988754051d07d8a91ff01f7 (diff)
parent5cc64e8da8db1baba601fff5ae90cf8cef2ba183 (diff)
downloadrust-69fd5e4059f8840f09f60269bcda23dcdcb77151.tar.gz
rust-69fd5e4059f8840f09f60269bcda23dcdcb77151.zip
Auto merge of #136828 - yotamofek:pr/rustdoc/more-laziness, r=GuillaumeGomez,aDotInTheVoid
Do more lazy-formatting in `librustdoc` 🦥

Modify some formatting to be lazy, i.e. to not allocate interim strings that are later formatted into different strings.
Commits are small and stand on their own, and should mostly compile separately. (The first one doesn't compile due to `dead_code` because all it does is introduce a helper used in later commits)

Really excited about this one, local perf results are really good. I'd love a perf run to see how this looks on CI. This is the comparison of `instructions:u` count between master and this PR, on my computer:

# Summary
| | Range | Mean | Count |
|:---:|:---:|:---:|:---:|
| Regressions | - | 0.00% | 0 |
| Improvements | -8.03%, -0.40% | -2.93% | 5 |
| All | -8.03%, -0.40% | -2.93% | 5 |

# Primary benchmarks
| Benchmark | Profile | Scenario | % Change | Significance Factor |
|:---:|:---:|:---:|:---:|:---:|
| typenum-1.17.0 | doc | full | -8.03% | 40.16x |
| nalgebra-0.33.0 | doc | full | -4.19% | 20.97x |
| stm32f4-0.14.0 | doc | full | -1.35% | 6.73x |
| libc-0.2.124 | doc | full | -0.67% | 3.33x |
| cranelift-codegen-0.82.1 | doc | full | -0.40% | 1.99x |
Diffstat (limited to 'compiler/rustc_resolve/src/rustdoc.rs')
0 files changed, 0 insertions, 0 deletions