Refactor HygieneEncodeContext - #162520
Conversation
|
This is missing some high level description. |
So the changes are to 1) reuse the capacity between the loop iterations (#162520 (comment)) and 2) move some map searches under the |
Renamed them back.
There were borrowing problems because hygiene context is contained inside the encoder. @rustbot ready |
|
✌️ @aerooneqq, you can now approve this pull request! If @petrochenkov told you to " |
|
Reminder, once the PR becomes ready for a review, use |
|
@bors squash |
This comment has been minimized.
This comment has been minimized.
* Refactor `HygieneEncodeContext` * Review: remove comment outdated part * Review: return `raw_encode_syntax_context` as a free function * Review: small cleanups * Review: add comment about expansions data `Option` * Review: don't set explicit capacity * Review: return `queued` -> `latest` * Remove not needed changes * Fix `Rc` cloning * Return comment
|
🔨 10 commits were squashed into 69afc99. |
c0911fe to
69afc99
Compare
|
@bors r=petrochenkov |
|
If bors squash is used, then it's better to use |
…nkov Refactor `HygieneEncodeContext` Some refactorings around `HygieneEncodeContext` with minor perf improvements, the most notable thing is that `Lock`s were removed. First part for rust-lang#161450. r? @petrochenkov
…nkov Refactor `HygieneEncodeContext` Some refactorings around `HygieneEncodeContext` with minor perf improvements, the most notable thing is that `Lock`s were removed. First part for rust-lang#161450. r? @petrochenkov
…uwer Rollup of 10 pull requests Successful merges: - #162126 (Rename various resolving functions for consistency, and document them) - #162520 (Refactor `HygieneEncodeContext`) - #154373 (Skip linting unused braces for FunctionArg and MethodArg context for 2024 later ) - #160023 (Refactor the way cg_ssa handles indirect returns (returns via `sret`) — Take 2) - #161482 (Use attribute parser for `#[non_exhaustive]` attribute check) - #161867 (deeper `rustc_builtin_macros` cleanups) - #162099 (small refactor of doc attribute arguments warnings) - #162541 (split `macroless_generic_const_args` in two) - #162549 (The fuchsia team maintains `riscv64gc-unknown-fuchsia`) - #162577 (Fix `i686-pc-windows-msvc` platform support docs and target spec metadata)
|
⌛ Testing commit 69afc99 with merge f3f47c1... Workflow: https://github.com/rust-lang/rust/actions/runs/34590729157 |
Refactor `HygieneEncodeContext` Some refactorings around `HygieneEncodeContext` with minor perf improvements, the most notable thing is that `Lock`s were removed. First part for #161450. r? @petrochenkov
…nkov Refactor `HygieneEncodeContext` Some refactorings around `HygieneEncodeContext` with minor perf improvements, the most notable thing is that `Lock`s were removed. First part for rust-lang#161450. r? @petrochenkov
|
@bors yield |
|
Auto build was cancelled. Cancelled workflows: The next pull request likely to be tested is #162631. |
…uwer Rollup of 11 pull requests Successful merges: - #162520 (Refactor `HygieneEncodeContext`) - #154373 (Skip linting unused braces for FunctionArg and MethodArg context for 2024 later ) - #160023 (Refactor the way cg_ssa handles indirect returns (returns via `sret`) — Take 2) - #160860 (Implement arbitrary casts in custom mir) - #161482 (Use attribute parser for `#[non_exhaustive]` attribute check) - #161867 (deeper `rustc_builtin_macros` cleanups) - #162099 (small refactor of doc attribute arguments warnings) - #162541 (split `macroless_generic_const_args` in two) - #162549 (The fuchsia team maintains `riscv64gc-unknown-fuchsia`) - #162577 (Fix `i686-pc-windows-msvc` platform support docs and target spec metadata) - #162624 (regression test for opaque field projection in closure capture)
Rollup merge of #162520 - aerooneqq:hygiene-perf, r=petrochenkov Refactor `HygieneEncodeContext` Some refactorings around `HygieneEncodeContext` with minor perf improvements, the most notable thing is that `Lock`s were removed. First part for #161450. r? @petrochenkov
|
Note This PR was benchmarked as part of triage of its containing rollup: triage URL. Finished benchmarking commit (9b2b438): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)This perf run didn't have relevant results for this metric. CyclesThis perf run didn't have relevant results for this metric. Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: missing data |
View all comments
Some refactorings around
HygieneEncodeContextwith minor perf improvements, the most notable thing is thatLocks were removed.First part for #161450.
r? @petrochenkov