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
vec::MoveIterator is written in such a way to be safe for dtors, but this is unnecessary overhead for POD types. Because vec is such an important type, it's worth optimizing for this case. I think all we need is to make use of std::libstd::needs_drop(), but I'm not completely sure if that's all that is needed.
The text was updated successfully, but these errors were encountered:
I have an experimental implementation of this in this gist. It's roughly twice as fast, but I'm not sure if it's safe yet. It's still 10% slower than v.iter().map(|x| *x) though.
vec::MoveIterator
is written in such a way to be safe for dtors, but this is unnecessary overhead for POD types. Because vec is such an important type, it's worth optimizing for this case. I think all we need is to make use ofstd::libstd::needs_drop()
, but I'm not completely sure if that's all that is needed.The text was updated successfully, but these errors were encountered: