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
I have a µcontroller that suffers with the push's including a branch on the len check (no branch predictor). I would like to reserve sufficient space, then push unchecked to avoid the overhead. I could similarly accomplish my goals with a spare_capacity_mut interface similar to Vec, but that provides slightly different internal data structure control rather than pushing initialized values through a more normal interface.
An Extend interface could benefit from this as well because it uses push internally. The Extend impl change would not resolve my purpose because it would require the overhead of managing state within the Iterator instance, so a pub push_unchecked would be preferred for me.
Would you be open to a PR with an unsafe push_unchecked impl?
The text was updated successfully, but these errors were encountered:
I have a µcontroller that suffers with the push's including a branch on the len check (no branch predictor). I would like to reserve sufficient space, then push unchecked to avoid the overhead. I could similarly accomplish my goals with a spare_capacity_mut interface similar to Vec, but that provides slightly different internal data structure control rather than pushing initialized values through a more normal interface.
An Extend interface could benefit from this as well because it uses push internally. The Extend impl change would not resolve my purpose because it would require the overhead of managing state within the Iterator instance, so a pub push_unchecked would be preferred for me.
Would you be open to a PR with an unsafe push_unchecked impl?
The text was updated successfully, but these errors were encountered: