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
When I'm cloning a small SmallVec I don't mind this at all, but there should probably be a branch for the spilled case.
I'm not amazing at reading assembly but I think it's actually worse than "not a memcpy", pretty sure I see the increment for the SetLenOnDrop in there still 😬
The text was updated successfully, but these errors were encountered:
That's what the specialization feature does. Without specialization, that's hard to do because from_slice (and memcpy) only works for T: Copy, while clone works for any T: Clone.
Playground example: https://play.rust-lang.org/?version=stable&mode=release&edition=2018&gist=64230bf4215b7206e80b1f37198cf611
When I'm cloning a small
SmallVec
I don't mind this at all, but there should probably be a branch for the spilled case.I'm not amazing at reading assembly but I think it's actually worse than "not a memcpy", pretty sure I see the increment for the
SetLenOnDrop
in there still 😬The text was updated successfully, but these errors were encountered: