-
Notifications
You must be signed in to change notification settings - Fork 525
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
Reorganize decode_varint to remove an unsafe block #288
Conversation
The generated assembly for this is identical to the previous.
Failing tests don't seem related? |
@alex how did you validate the assembly? Afaict from |
https://rust.godbolt.org/ - IIRC I copied in the minimal amount of source for the buf trait and implementation |
It seems this was approved but never merged. What's blocking this? |
@Shnatsel this patch unfortunately regresses performance measurably in the in-tree benchmark suite (both micro varint decoding, as well as macro message decoding). As such I'm not in favor of landing it, since I think the unsafe usage is low risk. I'm going to keep it open since I think the problem may be solvable, but at the moment this is not on track to get merged. |
Note to self: I haven't re-tested this since the bytes 0.6 update, so it's possible that the perf regression is no longer present. |
Re-ran this bench against master and still seeing a regression in decoding varints
So I am going to go ahead and close the PR inline with what Dan said above. Thanks for the contribution! |
This looks like a compiler problem to me. |
The generated assembly for this is identical to the previous.