Uh oh!
There was an error while loading. Please reload this page.
bench and optimize from_slice - #118
Merged
Merged
Conversation
llogiq
commented
Aug 22, 2018
ContributorAuthor
travis error is unrelated – current nightly fails to build master as well. |
mbrubeck
commented
Aug 22, 2018
Collaborator
@bors-servo r+ |
bors-servo
commented
Aug 22, 2018
Contributor
📌 Commit 2894fc5 has been approved by |
bors-servo pushed a commit
that referenced
this pull request
Aug 22, 2018
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 -->
bors-servo
commented
Aug 22, 2018
Contributor
bors-servo
commented
Aug 22, 2018
Contributor
💔 Test failed - status-travis |
mbrubeck
commented
Aug 22, 2018
Collaborator
Looks like this needs a |
llogiqforce-pushed
the
optimize-from-slice
branch
from
August 22, 2018 17:46
2894fc5 to
b0c7dd1Comparellogiq
commented
Aug 22, 2018
ContributorAuthor
I'll settle for |
llogiqforce-pushed
the
optimize-from-slice
branch
from
August 22, 2018 20:10
b0c7dd1 to
0801880CompareThis 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) ```
llogiqforce-pushed
the
optimize-from-slice
branch
from
August 22, 2018 20:14
0801880 to
7633aebCompareContributorAuthor
@mbrubeck this is ready to merge now. Also perhaps we could get a new version out now that rustc is going to use it... |
mbrubeck
commented
Aug 22, 2018
Collaborator
@bors-servo r+ |
bors-servo
commented
Aug 22, 2018
Contributor
📌 Commit 7633aeb has been approved by |
bors-servo
commented
Aug 22, 2018
Contributor
bors-servo pushed a commit
that referenced
this pull request
Aug 22, 2018
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 -->
bors-servo
commented
Aug 22, 2018
Contributor
☀️ Test successful - status-travis |
mbrubeck added a commit
to mbrubeck/rust-smallvec
that referenced
this pull request
Aug 22, 2018
mbrubeck added a commit
to mbrubeck/rust-smallvec
that referenced
this pull request
Aug 22, 2018
Merged
bors-servo pushed a commit
that referenced
this pull request
Aug 22, 2018
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds "bench_from_slice(_vec)(_small)" benches, renaming the previous versions to "bench_from_iter*" (because they were using
From<&[T]>, which callsFromIteratorinternally) and optimizes thefrom_sliceconstructor considerably.Before:
After:
This change is