Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upEstimate the overhead versus plain Vec #87
Closed
Labels
Comments
bors-servo
added a commit
that referenced
this issue
May 17, 2018
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 -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Benchmarks appear to only track
SmallVecperformance. Are there any estimations of the overhead?