-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Allow for reading raw bytes from rustc_serialize::Decoder without unsafe code #83465
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
Conversation
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 517d5ac with merge 8454a31114a0ff65016cc30a4c74570cdabc03b2... |
☀️ Try build successful - checks-actions |
Queued 8454a31114a0ff65016cc30a4c74570cdabc03b2 with parent 372afcf, future comparison URL. |
Finished benchmarking try commit (8454a31114a0ff65016cc30a4c74570cdabc03b2): 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 |
@bors r+ |
📌 Commit 517d5ac has been approved by |
There seems to be a slight regression in terms of instruction counts. Interestingly, using I've tested a few different versions at https://play.rust-lang.org/?version=nightly&mode=release&edition=2018&gist=4933fb0cfc1884086c846c98260bd4c7. The assembly code of all versions that avoid that additional check look the same (or almost the same) and should perform the same. I'm not sure yet if we really should skip that additional check. In theory the |
The regression in instruction count is within noise, with no actual effect on wall-time. max-rss is green-ish. |
☀️ Test successful - checks-actions |
The current
read_raw_bytes
method requires usingMaybeUninit
andunsafe
. I don't think this is necessary. Let's see if a safe interface has any performance drawbacks.This is a followup to #83273 and will make it easier to rebase #82183.
r? @cjgillot