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 upSome small simplifications #113
Merged
Conversation
benches show nothing out of the ordinary: ``` name smallvecbench.txt ns/iter smallvecbench-new.txt ns/iter diff ns/iter diff % speedup bench_extend 47 47 0 0.00% x 1.00 bench_extend_from_slice 41 41 0 0.00% x 1.00 bench_extend_from_slice_small 12 12 0 0.00% x 1.00 bench_extend_from_slice_vec 55 55 0 0.00% x 1.00 bench_extend_from_slice_vec_small 25 25 0 0.00% x 1.00 bench_extend_small 13 13 0 0.00% x 1.00 bench_extend_vec 66 58 -8 -12.12% x 1.14 bench_extend_vec_small 24 24 0 0.00% x 1.00 bench_from_slice 80 80 0 0.00% x 1.00 bench_from_slice_small 22 23 1 4.55% x 0.96 bench_from_slice_vec 32 30 -2 -6.25% x 1.07 bench_from_slice_vec_small 27 27 0 0.00% x 1.00 bench_insert 618 605 -13 -2.10% x 1.02 bench_insert_from_slice 85 85 0 0.00% x 1.00 bench_insert_many 177 177 0 0.00% x 1.00 bench_insert_small 119 120 1 0.84% x 0.99 bench_insert_vec 541 542 1 0.18% x 1.00 bench_insert_vec_small 123 125 2 1.63% x 0.98 bench_macro_from_elem 35 34 -1 -2.86% x 1.03 bench_macro_from_elem_small 7 7 0 0.00% x 1.00 bench_macro_from_elem_vec 40 34 -6 -15.00% x 1.18 bench_macro_from_elem_vec_small 27 27 0 0.00% x 1.00 bench_macro_from_list 21 22 1 4.76% x 0.95 bench_macro_from_list_vec 20 21 1 5.00% x 0.95 bench_push 388 386 -2 -0.52% x 1.01 bench_push_small 65 66 1 1.54% x 0.98 bench_push_vec 335 338 3 0.90% x 0.99 bench_push_vec_small 44 46 2 4.55% x 0.96 bench_pushpop 746 746 0 0.00% x 1.00 bench_pushpop_vec 247 247 0 0.00% x 1.00 bench_remove 414 411 -3 -0.72% x 1.01 bench_remove_small 89 90 1 1.12% x 0.99 bench_remove_vec 424 406 -18 -4.25% x 1.04 bench_remove_vec_small 80 81 1 1.25% x 0.99 ```
| } | ||
| } | ||
| } | ||
| self.iter.next().map(|reference| unsafe { ptr::read(reference) }) |
This comment has been minimized.
This comment has been minimized.
mbrubeck
Aug 7, 2018
Contributor
Normally I would suggest ptr::read(self.iter.next()?) but this requires Rust 1.22, and it's not raising the minimum Rust version for this crate yet.
|
@bors-servo r+ |
|
|
bors-servo
added a commit
that referenced
this pull request
Aug 7, 2018
Some small simplifications benches show nothing out of the ordinary: ``` name smallvecbench.txt ns/iter smallvecbench-new.txt ns/iter diff ns/iter diff % speedup bench_extend 47 47 0 0.00% x 1.00 bench_extend_from_slice 41 41 0 0.00% x 1.00 bench_extend_from_slice_small 12 12 0 0.00% x 1.00 bench_extend_from_slice_vec 55 55 0 0.00% x 1.00 bench_extend_from_slice_vec_small 25 25 0 0.00% x 1.00 bench_extend_small 13 13 0 0.00% x 1.00 bench_extend_vec 66 58 -8 -12.12% x 1.14 bench_extend_vec_small 24 24 0 0.00% x 1.00 bench_from_slice 80 80 0 0.00% x 1.00 bench_from_slice_small 22 23 1 4.55% x 0.96 bench_from_slice_vec 32 30 -2 -6.25% x 1.07 bench_from_slice_vec_small 27 27 0 0.00% x 1.00 bench_insert 618 605 -13 -2.10% x 1.02 bench_insert_from_slice 85 85 0 0.00% x 1.00 bench_insert_many 177 177 0 0.00% x 1.00 bench_insert_small 119 120 1 0.84% x 0.99 bench_insert_vec 541 542 1 0.18% x 1.00 bench_insert_vec_small 123 125 2 1.63% x 0.98 bench_macro_from_elem 35 34 -1 -2.86% x 1.03 bench_macro_from_elem_small 7 7 0 0.00% x 1.00 bench_macro_from_elem_vec 40 34 -6 -15.00% x 1.18 bench_macro_from_elem_vec_small 27 27 0 0.00% x 1.00 bench_macro_from_list 21 22 1 4.76% x 0.95 bench_macro_from_list_vec 20 21 1 5.00% x 0.95 bench_push 388 386 -2 -0.52% x 1.01 bench_push_small 65 66 1 1.54% x 0.98 bench_push_vec 335 338 3 0.90% x 0.99 bench_push_vec_small 44 46 2 4.55% x 0.96 bench_pushpop 746 746 0 0.00% x 1.00 bench_pushpop_vec 247 247 0 0.00% x 1.00 bench_remove 414 411 -3 -0.72% x 1.01 bench_remove_small 89 90 1 1.12% x 0.99 bench_remove_vec 424 406 -18 -4.25% x 1.04 bench_remove_vec_small 80 81 1 1.25% x 0.99 ``` <!-- 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/113) <!-- Reviewable:end -->
|
|
mbrubeck
added a commit
to mbrubeck/rust-smallvec
that referenced
this pull request
Aug 22, 2018
Merged
bors-servo
added 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 comment has been minimized.
This comment has been minimized.
Shnatsel
commented on 4d02e41
Jun 29, 2019
|
This seems to be the commit that introduced #148 |
Sign up for free
to 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.
llogiq commentedAug 7, 2018
•
edited by larsbergstrom
benches show nothing out of the ordinary:
This change is