-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
rustc_serialize: specialize opaque encoding and decoding of some u8 sequences #80115
rustc_serialize: specialize opaque encoding and decoding of some u8 sequences #80115
Conversation
r? @estebank (rust-highfive has picked a reviewer for you, use r? to override) |
@rustbot label T-compiler I-compiletime This mainly optimizes for the |
@bors try @rust-timer queue |
Awaiting bors try build completion. |
⌛ Trying commit 2a06635df1b69708887dbcc609e4701b11cbb672 with merge fb6802e125edaf831dc7db84a5aa3110ac47f134... |
☀️ Try build successful - checks-actions |
Queued fb6802e125edaf831dc7db84a5aa3110ac47f134 with parent d23e084, future comparison URL. @rustbot label: +S-waiting-on-perf |
Finished benchmarking try commit (fb6802e125edaf831dc7db84a5aa3110ac47f134): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
ctfe-stress-4 shows major improvements. ctfe-stress-4-check even shows an 86% improvement for incr-unchanged. Other than that there are slight (<1%) improvements and no regressions. |
2a06635
to
be79f49
Compare
Rebased and fixed conflict. By the way, this is kind of a "soft" blocker on #80463 (only for performance reasons). |
@bors r+ rollup=never |
📌 Commit be79f49 has been approved by |
☀️ Test successful - checks-actions |
This specializes encoding and decoding of some contiguous u8 sequences to use a more efficient implementation. The default implementations process each u8 individually, but that isn't necessary for the opaque encoder and decoder. The opaque encoding for u8s is a no-op, so we can just copy entire sequences as-is, rather than process them byte by byte.
This also changes some encode and decode implementations for contiguous sequences to forward to the slice and vector implementations, so that they can take advantage of the new specialization when applicable.