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 #107 - RReverser:macro-non-copy, r=mbrubeck
Allow smallvec! with non-Copy items
When count of items is smaller or equal than the target inline size, macro will use `SmallVec::push`, but when it's large enough, it passes data on to `vec!` macro for in-place heap allocation and then uses `SmallVec::from_vec`.
This trick gives ~3.5x performance increase on `bench_macro_from_list` compared to `SmallVec::with_capacity`.
Fixes#98.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-smallvec/107)
<!-- Reviewable:end -->
0 commit comments