-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Use index newtyping for TyVid #88710
Conversation
r? @nagisa (rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
d3b845f
to
278f2a7
Compare
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.
One small nit, but r=me otherwise
r? @jackh726 |
278f2a7
to
2eac09d
Compare
@bors r=jackh726 |
📌 Commit 2eac09d has been approved by |
@bors rollup=never It's possible this is perf sensitive, given |
⌛ Testing commit 2eac09d with merge 99db26bb785497c59593b01985d8983e640229d1... |
💥 Test timed out |
Majority of the builders finished, with distcheck being the odd one out - I'm guessing this is spurious. @bors retry |
☀️ Test successful - checks-actions |
Finished benchmarking commit (69c4aa2): comparison url. Summary: This change led to moderate relevant regressions 😿 in compiler performance.
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression |
Hm, interesting. My guess is the extra checks for from_u32/from_usize being in-range (now that we have some niche bits) are causing the worse performance -- that said, cycle times seem more improved than not (https://perf.rust-lang.org/compare.html?start=73641cd23ba470c6b4dcd72b8d5f62d27c735254&end=69c4aa2901ffadf69deaf91b2f90604bcbc2eb36&stat=cycles%3Au) and generally keccak is more of a stress test than real world code. I'll try to spend some time with cachegrind investigating this. |
Cachegrind seems to confirm that the index manipulation is the likely cause of the added overhead. I don't think that's worth fixing with unsafe code (and would be difficult to justify). |
This is useful for using TyVid in types like VecGraph, and just otherwise seems like a small win.