-
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
Removed dependency on the field-offset crate. #136003
Conversation
rustbot has assigned @Mark-Simulacrum. Use |
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
This was spawned from #135870 (comment). The field-offset crate doesn't work with strict provenance, which miri forces when using tree borrows. @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
…=<try> Removed dependency on the field-offset crate. This touches the core of the query system, should be evaluated carefully for performance.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
2681c12
to
5fd7599
Compare
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
…=<try> Removed dependency on the field-offset crate. This touches the core of the query system, should be evaluated carefully for performance.
5fd7599
to
878cdda
Compare
The list of allowed third-party dependencies may have been modified! You must ensure that any new dependencies have compatible licenses before merging. |
@rustbot ready |
This comment has been minimized.
This comment has been minimized.
878cdda
to
4efb1b1
Compare
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
…=<try> Removed dependency on the field-offset crate. This touches the core of the query system, should be evaluated carefully for performance.
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (09d1d97): 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 2.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.
CyclesResults (secondary 2.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: 771.063s -> 769.268s (-0.23%) |
Hmmm, not entirely sure what causes the RSS size increase, that one feels weird to me. However, the increase in instruction count is less than I would have expected, given that this replaces a most likely inlineable function with an indirect function call. I feel the advantages of completely avoiding unsafe code and reducing the dependency list by two dependencies here are worth it. However if this is deemed too large a regression I can also build a second approach that directly uses offset calculations. That would involve unsafe code but would still eliminate the dependency and removes the need for the indirect function call. @rustbot label: +perf-regression-triaged |
My guess is that the max-rss regression on a single test case is likely spurious. IMO, either replacing this with storing the offsets and doing the indexing with unsafe code or upstreaming strict provenance to the field offset crate would make sense. (Or both). I don't think there's much value in regressing here -- especially given the ~150kb of code this seems to add (probably due to the tiny offset functions). |
I would suggest we move away from the dependency, as it seems to be unmaintained, and even if it isn't it currently has a bus factor of 1. Given that it really is used in so few places, I think it's just not worth it to keep around. I will make a version doing the offset calculation directly later tonight (CET) so we can compare. |
…t, r=<try> Removed dependency on the field-offset crate, alternate approach This is an alternate approach to reach the same goals as rust-lang#136003. As it touches the core of the query system, this too probably should be evaluated for performance. r? `@Mark-Simulacrum`
Replaced by #136201. |
…t, r=Mark-Simulacrum Removed dependency on the field-offset crate, alternate approach This is an alternate approach to reach the same goals as rust-lang#136003. As it touches the core of the query system, this too probably should be evaluated for performance. r? `@Mark-Simulacrum`
…alt, r=Mark-Simulacrum Removed dependency on the field-offset crate, alternate approach This is an alternate approach to reach the same goals as rust-lang#136003. As it touches the core of the query system, this too probably should be evaluated for performance. r? `@Mark-Simulacrum`
…alt, r=Mark-Simulacrum Removed dependency on the field-offset crate, alternate approach This is an alternate approach to reach the same goals as rust-lang#136003. As it touches the core of the query system, this too probably should be evaluated for performance. r? ``@Mark-Simulacrum``
Rollup merge of rust-lang#136201 - davidv1992:eliminate-field-offset-alt, r=Mark-Simulacrum Removed dependency on the field-offset crate, alternate approach This is an alternate approach to reach the same goals as rust-lang#136003. As it touches the core of the query system, this too probably should be evaluated for performance. r? ``@Mark-Simulacrum``
This touches the core of the query system, should be evaluated carefully for performance.