-
Notifications
You must be signed in to change notification settings - Fork 149
bench and optimize from_slice
#118
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
Conversation
travis error is unrelated – current nightly fails to build master as well. |
@bors-servo r+ |
📌 Commit 2894fc5 has been approved by |
bench and optimize `from_slice` This adds "bench_from_slice(_vec)(_small)" benches, renaming the previous versions to "bench_from_iter*" (because they were using `From<&[T]>`, which calls `FromIterator` internally) and optimizes the `from_slice` constructor considerably. Before: ``` test bench_from_slice ... bench: 42 ns/iter (+/- 0) test bench_from_slice_small ... bench: 12 ns/iter (+/- 0) ``` After: ``` test bench_from_slice ... bench: 27 ns/iter (+/- 0) test bench_from_slice_small ... bench: 8 ns/iter (+/- 0) ``` <!-- 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/118) <!-- Reviewable:end -->
💔 Test failed - status-travis |
Looks like this needs a |
2894fc5
to
b0c7dd1
Compare
I'll settle for |
b0c7dd1
to
0801880
Compare
This adds "bench_from_slice(_vec)(_small)" benches, renaming the previous versions to "bench_from_iter*" (because they were using `From<&[T]>`, which calls `FromIterator` internally) and optimizes the `from_slice` constructor considerably. Before: ``` test bench_from_slice ... bench: 42 ns/iter (+/- 0) test bench_from_slice_small ... bench: 12 ns/iter (+/- 0) ``` After: ``` test bench_from_slice ... bench: 27 ns/iter (+/- 0) test bench_from_slice_small ... bench: 8 ns/iter (+/- 0) ```
0801880
to
7633aeb
Compare
@mbrubeck this is ready to merge now. Also perhaps we could get a new version out now that rustc is going to use it... |
@bors-servo r+ |
📌 Commit 7633aeb has been approved by |
bench and optimize `from_slice` This adds "bench_from_slice(_vec)(_small)" benches, renaming the previous versions to "bench_from_iter*" (because they were using `From<&[T]>`, which calls `FromIterator` internally) and optimizes the `from_slice` constructor considerably. Before: ``` test bench_from_slice ... bench: 42 ns/iter (+/- 0) test bench_from_slice_small ... bench: 12 ns/iter (+/- 0) ``` After: ``` test bench_from_slice ... bench: 27 ns/iter (+/- 0) test bench_from_slice_small ... bench: 8 ns/iter (+/- 0) ``` <!-- 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/118) <!-- Reviewable:end -->
☀️ Test successful - status-travis |
Version 0.6.5 Change log: * #115 - add `into_inner` method * #117 - add `from_buf_and_len` and `from_buf_and_len_unchecked` * #118 - optimize `from_slice` * Some code cleanup and testing improvements (#112, #113, #114, #120) cc @llogiq <!-- 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/121) <!-- Reviewable:end -->
This adds "bench_from_slice(_vec)(_small)" benches, renaming the previous versions to "bench_from_iter*" (because they were using
From<&[T]>
, which callsFromIterator
internally) and optimizes thefrom_slice
constructor considerably.Before:
After:
This change is