Conversation
Update documentation for `cold_path`, `likely`, and `unlikely` * Add a note recommending benchmarks to `cold_path`, as other hints have * Note that `cold_path` can be used to implement `likely` and `unlikely` * Update the tracking issue for the `likely_unlikely` feature Tracking issue: rust-lang/rust#136873 Tracking issue: rust-lang/rust#151619
Rollup of 2 pull requests Successful merges: - rust-lang/rust#151612 (Update documentation for `cold_path`, `likely`, and `unlikely`) - rust-lang/rust#151670 (compiletest: Parse aux `proc-macro` directive into struct)
Do not return incorrectly constrained opaques in `method_autoderef_steps` Fixes rust-lang/trait-system-refactor-initiative#263 r? @lcnr
Remove copyright notices for files licensed under the standard terms (MIT OR Apache-2.0).
Try to reduce rustdoc GUI tests flakyness Should help with rust-lang/rust#93784. I replaced a use of `puppeteer.wait` function with a loop instead (like the rest of `browser-ui-test`). r? @jieyouxu
slice/ascii: Optimize `eq_ignore_ascii_case` with auto-vectorization
- Refactor the current functionality into a helper function
- Use `as_chunks` to encourage auto-vectorization in the optimized chunk processing function
- Add a codegen test checking for vectorization and no panicking
- Add benches for `eq_ignore_ascii_case`
---
The optimized function is initially only enabled for x86_64 which has `sse2` as part of its baseline, but none of the code is platform specific. Other platforms with SIMD instructions may also benefit from this implementation.
Performance improvements only manifest for slices of 16 bytes or longer, so the optimized path is gated behind a length check for greater than or equal to 16.
Benchmarks - Cases below 16 bytes are unaffected, cases above all show sizeable improvements.
```
before:
str::eq_ignore_ascii_case::bench_large_str_eq 4942.30ns/iter +/- 48.20
str::eq_ignore_ascii_case::bench_medium_str_eq 632.01ns/iter +/- 16.87
str::eq_ignore_ascii_case::bench_str_17_bytes_eq 16.28ns/iter +/- 0.45
str::eq_ignore_ascii_case::bench_str_31_bytes_eq 35.23ns/iter +/- 2.28
str::eq_ignore_ascii_case::bench_str_of_8_bytes_eq 7.56ns/iter +/- 0.22
str::eq_ignore_ascii_case::bench_str_under_8_bytes_eq 2.64ns/iter +/- 0.06
after:
str::eq_ignore_ascii_case::bench_large_str_eq 611.63ns/iter +/- 28.29
str::eq_ignore_ascii_case::bench_medium_str_eq 77.10ns/iter +/- 19.76
str::eq_ignore_ascii_case::bench_str_17_bytes_eq 3.49ns/iter +/- 0.39
str::eq_ignore_ascii_case::bench_str_31_bytes_eq 3.50ns/iter +/- 0.27
str::eq_ignore_ascii_case::bench_str_of_8_bytes_eq 7.27ns/iter +/- 0.09
str::eq_ignore_ascii_case::bench_str_under_8_bytes_eq 2.60ns/iter +/- 0.05
```
Omit standard copyright notice Remove copyright notices for files licensed under the standard terms (MIT OR Apache-2.0).
Rollup of 5 pull requests Successful merges: - rust-lang/rust#151692 (Try to reduce rustdoc GUI tests flakyness) - rust-lang/rust#147436 (slice/ascii: Optimize `eq_ignore_ascii_case` with auto-vectorization) - rust-lang/rust#151390 (Reintroduce `QueryStackFrame` split.) - rust-lang/rust#151097 (Use an associated type default for `Key::Cache`.) - rust-lang/rust#151702 (Omit standard copyright notice)
compiletest: Add `CompilerKind` to distinguish between rustc and rustdoc This PR slightly improves `TestCx::make_compile_args` by using `CompilerKind` to explicitly distinguish between rustc and rustdoc. The resulting code could still use more attention, but I think this is a good incremental improvement. There *should* (hopefully) be no change to overall compiletest behaviour.
Update to LLVM 22 Scheduled release date: Feb 24 1.94 becomes stable: Mar 5 Changes: * Update to rc2, with one patch to work around our outdated illumos sysroot (rust-lang/llvm-project@41256ab). * Update the host toolchain as well, otherwise we lose cross-language LTO, in particular for jemalloc. * Adjust one loongarch assembly test. The split into r and s variants is based on the suggestion in rust-lang/rust#151134. Depends on: * [x] rust-lang/rust#151410 * [ ] rust-lang/rust#150756 * [x] llvm/llvm-project#175190 * [x] llvm/llvm-project#175912 * [x] llvm/llvm-project#175965 * [x] llvm/llvm-project#176195 * [x] llvm/llvm-project#157073 * [x] llvm/llvm-project#176421 * [x] llvm/llvm-project#176925 * [x] llvm/llvm-project#177187
…acrum Tweak `SlicePartialEq` to allow MIR-inlining the `compare_bytes` call rust-lang/rust#150265 disabled this because it was a net perf win, but let's see if we can tweak the structure of this to allow more inlining on this side while still not MIR-inlining the loop when it's not just `memcmp` and thus hopefully preserving the perf win. This should also allow MIR-inlining the length check, which was previously blocked, and thus might allow some obvious non-matches to optimize away as well.
This updates the rust-version file to 370143facfb348ad3b29749c0393402d76b280c3.
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@370143f Filtered ref: e706cc1 Upstream diff: rust-lang/rust@0462e8f...370143f This merge was created using https://github.com/rust-lang/josh-sync.
Collaborator
|
Thanks for the PR. If you have write access, feel free to merge this PR if it does not need reviews. You can request a review using |
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.
Latest update from rustc.