Fix non-deterministic encoding of syntax contexts - #161450
Conversation
This comment has been minimized.
This comment has been minimized.
b07d315 to
3f750ec
Compare
This comment has been minimized.
This comment has been minimized.
494d4da to
5fa08c7
Compare
This comment has been minimized.
This comment has been minimized.
a34d24f to
3868148
Compare
This comment has been minimized.
This comment has been minimized.
| .collect() | ||
| }); | ||
|
|
||
| all_ctxt_data.sort_by_key(|&(ctxt, _)| self.get_encoding_index(ctxt)); |
There was a problem hiding this comment.
Note: here and below get_encoding_index takes the encoding_indices in every iteration of the loop, it could be more efficient to take the lock once.
There was a problem hiding this comment.
I think we do not need locks at all, I replaced them with RefCells for now, can try to rewrite it without it.
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…ing, r=<try> Fix non-deterministic encoding of syntax contexts
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (7e01adf): comparison URL. Overall result: ❌ regressions - please read:Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. Next, please: If you can, justify the regressions found in this try perf run in writing along with @bors rollup=never rustc-perf Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 1.0%, secondary -1.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -0.2%, secondary 4.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 476.065s -> 474.462s (-0.34%) |
3868148 to
4846400
Compare
|
Unknown argument "rustc-timer". Did you mean to use |
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (ea02f1d): comparison URL. Overall result: ❌✅ regressions and improvements - please read:Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. Next, please: If you can, justify the regressions found in this try perf run in writing along with @bors rollup=never rustc-perf Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -2.7%, secondary -2.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -2.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 477.995s -> 478.812s (0.17%) |
4846400 to
3bfb66a
Compare
This comment has been minimized.
This comment has been minimized.
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…ing, r=<try> Fix non-deterministic encoding of syntax contexts
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (e742195): comparison URL. Overall result: ❌✅ regressions and improvements - please read:Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. Next, please: If you can, justify the regressions found in this try perf run in writing along with @bors rollup=never rustc-perf Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 0.8%, secondary -1.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 0.4%, secondary 4.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 479.129s -> 477.217s (-0.40%) |
…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
…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
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
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
This comment has been minimized.
This comment has been minimized.
3bfb66a to
56c09cd
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@rustbot ready |
View all comments
Reiteration of #157409. Explanation can be found in comment for
encoding_indicesand in the issue.Fixes #129094. Blocked by #161353.
r? @petrochenkov
No llms used.