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 #95 - Vurich:vec-benches, r=mbrubeck
Add benchmarks for Vec to compare to SmallVec
Preliminary results aren't good, although no benches check for cache efficiency (for example `Vec<Vec<T>>` vs `Vec<SmallVec<[T; N]>>`).
Here's a comparison. I used `sed` to split the `_vec` benchmarks out and rename them to have the same name, so `cargo benchcmp` can understand them.
```
name vec.bench ns/iter smallvec.bench ns/iter diff ns/iter diff % speedup
bench_extend 69 53 -16 -23.19% x 1.30
bench_extend_from_slice 64 52 -12 -18.75% x 1.23
bench_from_slice 34 52 18 52.94% x 0.65
bench_insert 1,228 1,202 -26 -2.12% x 1.02
bench_macro_from_elem 50 66 16 32.00% x 0.76
bench_macro_from_list 33 47 14 42.42% x 0.70
bench_push 359 424 65 18.11% x 0.85
bench_pushpop 251 348 97 38.65% x 0.72
```
Closes#87
<!-- 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/95)
<!-- Reviewable:end -->
0 commit comments