-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
parallel: rustc_data_structures: sync: implement RwLock as enum { Sync(parking_lot::RwLock), NoSync(RefCell) } #136772
Conversation
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
…, r=<try> [perf run] parallel: rustc_data_structures: sync: implement RwLock as enum { Sync(parking_lot::RwLock), NoSync(RefCell) } Please, somebody, run perf. parallel: rustc_data_structures: sync: implement `RwLock` as `enum { Sync(parking_lot::RwLock), NoSync(RefCell) }` Hopefully this will make single threaded front end faster. I carefully split changes into commits. Commit messages are self-explanatory. Squashing is not recommended. cc "Parallel Rustc Front-end" rust-lang#113349 r? SparrowLii `@rustbot` label: +WG-compiler-parallel
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (d71a46a): comparison URL. Overall result: ❌ regressions - please read the text belowBenchmarking 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. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (primary 1.4%, secondary 2.3%)This 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.
CyclesResults (primary 3.2%, secondary 2.2%)This 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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 781.536s -> 779.774s (-0.23%) |
Results look bad. But I think instruction count is not relevant at this particular case. As well as I understand it literally counts instructions. I. e. integer addition, atomic compare-and-exchange and memory barrier will all count as one instruction. So, it is expected that instruction count will be larger than before. Because of those So, these are metrics we should look at:
Hopefully all them will be smaller. (I haven't looked at them yet. Yes, I share list above before actually seeing them to combat cherry picking ( https://en.wikipedia.org/wiki/Cherry_picking )) |
Side note: I want to attach |
Yea, sure. |
Okay, now I looked at these metrics, and they are not good. But I don't give up. :) Most of these metrics contain single test only. For example, |
And how to do this? |
You can refer to the impl of |
…never called, so let's remove them
…Lock" parking_lot::RwLock doesn't have "impl Clone", so we should not have, either
…lot::RwLock), NoSync(RefCell) } Also we remove ERROR_CHECKING, because RefCell already panics on borrow errors
95ce6d0
to
5397b39
Compare
@SparrowLii , okay, I figured it out. I used Please, do perf run again |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
…, r=<try> parallel: rustc_data_structures: sync: implement RwLock as enum { Sync(parking_lot::RwLock), NoSync(RefCell) } parallel: rustc_data_structures: sync: implement `RwLock` as `enum { Sync(parking_lot::RwLock), NoSync(RefCell) }` Hopefully this will make single threaded front end faster. I carefully split changes into commits. Commit messages are self-explanatory. Squashing is not recommended. cc "Parallel Rustc Front-end" rust-lang#113349 r? SparrowLii `@rustbot` label: +WG-compiler-parallel
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
The rest of the results weren't significant. You can display the non-significant results using the Filters UI. |
Finished benchmarking commit (3a40e21): comparison URL. Overall result: ❌ regressions - please read the text belowBenchmarking 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. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (primary 0.0%, secondary 2.2%)This 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.
CyclesResults (secondary -1.8%)This 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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 779.273s -> 781.777s (0.32%) |
Results look bad, again. It is difficult for me to properly interpret them. Still I'm not giving up. :) I will wait for |
Okay, I don't like timer results, and I don't want to spend my time more. So, I'm closing this PR. Theoretically, I think what we really should do is to measure wall clock time reliably. It is possible. For example, https://soft-dev.org/src/krun/ does this (they even have their own patched Linux kernel: https://github.com/softdevteam/krun-linux-kernel !). We should setup project-wide infra based on krun or something similar. But I personally don't want to do this, so I simply give up. So, I will not in near future submit more PRs to parallel compiler. (But it is possible I will send few clean-up patches) |
parallel: rustc_data_structures: sync: implement
RwLock
asenum { Sync(parking_lot::RwLock), NoSync(RefCell) }
Hopefully this will make single threaded front end faster.
I carefully split changes into commits. Commit messages are self-explanatory. Squashing is not recommended.
cc "Parallel Rustc Front-end" #113349
r? SparrowLii
@rustbot label: +WG-compiler-parallel