-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve AttrTokenStream
#115523
improve AttrTokenStream
#115523
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
Could not assign reviewer from: |
f079f3f
to
c5059c5
Compare
c5059c5
to
894dd3e
Compare
894dd3e
to
6eadfd2
Compare
6eadfd2
to
abfc6c4
Compare
8c89af6
to
f404990
Compare
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit f404990 with merge 940bc63a1822b2b7dd2068b9a03ee4f749c62f5a... |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (940bc63a1822b2b7dd2068b9a03ee4f749c62f5a): comparison URL. Overall result: ❌✅ regressions and improvements - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 627.22s -> 627.867s (0.10%) |
It looks that the average performance has a minor improvement, about 0.05%. |
The perf changes are most likely noise, but the PR doesn't complicate code so we can merge it. |
let idx = data | ||
.attrs | ||
.partition_point(|attr| matches!(attr.style, crate::AttrStyle::Outer)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How this works? Attributes in AttrVec
here contained in unspecified order and partition_point should return some meaningless result. And no test failure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Attributes are supposed to always be partitioned #[outer1] #[outer2] { #![inner1] #![inner2] }
because they go in left-to-right order.
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#113510 (Document soundness of Integer -> Pointer -> Integer conversions in `const` contexts.) - rust-lang#114412 (document our assumptions about symbols provided by the libc) - rust-lang#114813 (explain why we can mutate the FPU control word) - rust-lang#115523 (improve `AttrTokenStream`) - rust-lang#115536 (interpret: make MemPlace, Place, Operand types private to the interpreter) - rust-lang#115540 (Support debuginfo for custom MIR.) - rust-lang#115563 (llvm-wrapper: adapt for LLVM API change) r? `@ghost` `@rustbot` modify labels: rollup
Improve the performance of
AttrTokenStream::to_tokenstream
method