Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Estimate the overhead versus plain Vec #87

Closed
kvark opened this issue Mar 19, 2018 · 0 comments
Closed

Estimate the overhead versus plain Vec #87

kvark opened this issue Mar 19, 2018 · 0 comments
Labels

Comments

@kvark
Copy link
Member

@kvark kvark commented Mar 19, 2018

Benchmarks appear to only track SmallVec performance. Are there any estimations of the overhead?

@kvark kvark added the question label Mar 19, 2018
@jdm jdm changed the title Estimate the overhead versus plane Vec Estimate the overhead versus plain Vec Mar 19, 2018
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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.