-
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
Refactor how opaque::Decoder represents its contents #58653
Conversation
r? @dtolnay (rust_highfive has picked a reviewer for you, use r? to override) |
r? @kennytm (rust_highfive has picked a reviewer for you, use r? to override) |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Instead of (&[u8], position) simply store the &[u8] and reslice. This was originally written for rust-lang#58475, to see if removing the arithmetic helped with avoiding integer overflow checks, however I think the result is slightly more readable in general -- specifically the removal of set_position is a nice win. I think this might be a hair faster even without the changes in rust-lang#58475, but I haven't measured that.
r? @Zoxc |
I think some of this is cleaner, but I don't like the removal of the @bors try |
⌛ Trying commit 0fb3354 with merge 22e725c319a38bd48dcbd253cc0e1896cb4bbf8c... |
☀️ Test successful - checks-travis |
@rust-timer build 22e725c319a38bd48dcbd253cc0e1896cb4bbf8c |
Success: Queued 22e725c319a38bd48dcbd253cc0e1896cb4bbf8c with parent 17add24, comparison URL. |
Finished benchmarking try commit 22e725c319a38bd48dcbd253cc0e1896cb4bbf8c |
@Zoxc Looks like there's 3 2% regressions, on the |
This seems to be a performance regression. There's less instructions executed, but overall time is higher, which may indicate worse cache behavior. The |
Ooof, I always forget perf has other measures besides instruction counts. Silly CPUs with their inconsistent instruction count times. Since you said parts of this patch are cleaner, assuming it's perf neutral, would you want the bits that get rid of |
Awaiting feedback from @Zoxc -- most of this PR is going to be thrown out, so if closing it is the most sensible thing we can do that. |
I think we can just close this. |
👍 |
Instead of (&[u8], position) simply store the &[u8] and reslice.
This was originally written for #58475, to see if removing the arithmetic helped with avoiding integer overflow checks, however I think the result is slightly more readable in general -- specifically the removal of set_position is a nice win. I think this might be a hair faster even without the changes in #58475, but I haven't measured that.