You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of rust-lang#136159 - urben1680:urben1680-vecdeque-partition-point-optimization, r=<try>
`VecDeque::partition_point` and `binary_search_by` check first element in `back` slice only once
I noticed that the first element of the back slice is potentially checked twice for the partition_point method, first in an if-condition and second inside the respective body.
EDIT: Applied the same change to `binary_search_by` method.
In this change, the back slice is reduced by the first element and this offset is added to the result.
I am not sure how to trigger benchmarks for this, I assume doing this PR is the way to go for Bors.
Please tell me if this is not how pull requests should be done.
0 commit comments