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
Current Extend implementation of the SplitVec is only for convenience rather than for performance. The implementation looks as below
impl<T,G>Extend<T>forSplitVec<T,G>whereG:Growth,{fnextend<I:IntoIterator<Item = T>>(&mutself,iter:I){for x in iter {self.push(x);}}}
std::vec::Vec implementation, however, uses is optimized with special extend traits. With some book keeping and with the use of size hints, SplitVec can directly call std::vec::Vec::extend method and indirectly utilize these optimizations rather than pushing each element one after the other.
The text was updated successfully, but these errors were encountered:
Current
Extend
implementation of theSplitVec
is only for convenience rather than for performance. The implementation looks as belowstd::vec::Vec
implementation, however, uses is optimized with special extend traits. With some book keeping and with the use of size hints,SplitVec
can directly callstd::vec::Vec::extend
method and indirectly utilize these optimizations rather than pushing each element one after the other.The text was updated successfully, but these errors were encountered: