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

data_structures: make TinyList more readable and optimize remove(_) #52997

Merged
merged 1 commit into from Aug 6, 2018

Conversation

Projects
None yet
4 participants
@llogiq
Contributor

llogiq commented Aug 2, 2018

also add benchmarks

Before:

test tiny_list::test::bench_insert_empty             ... bench:           1 ns/iter (+/- 0)
test tiny_list::test::bench_insert_one               ... bench:          16 ns/iter (+/- 0)
test tiny_list::test::bench_remove_empty             ... bench:           2 ns/iter (+/- 0)
test tiny_list::test::bench_remove_one               ... bench:           6 ns/iter (+/- 0)
test tiny_list::test::bench_remove_unknown           ... bench:           4 ns/iter (+/- 0)

After:

test tiny_list::test::bench_insert_empty             ... bench:           1 ns/iter (+/- 0)
test tiny_list::test::bench_insert_one               ... bench:          16 ns/iter (+/- 0)
test tiny_list::test::bench_remove_empty             ... bench:           0 ns/iter (+/- 0)
test tiny_list::test::bench_remove_one               ... bench:           3 ns/iter (+/- 0)
test tiny_list::test::bench_remove_unknown           ... bench:           2 ns/iter (+/- 0)
make TinyList more readable and optimize remove(_)
also add benchmarks

Before:

```
test tiny_list::test::bench_insert_empty             ... bench:           1 ns/iter (+/- 0)
test tiny_list::test::bench_insert_one               ... bench:          16 ns/iter (+/- 0)
test tiny_list::test::bench_remove_empty             ... bench:           2 ns/iter (+/- 0)
test tiny_list::test::bench_remove_one               ... bench:           6 ns/iter (+/- 0)
test tiny_list::test::bench_remove_unknown           ... bench:           4 ns/iter (+/- 0)
```

After:

```
test tiny_list::test::bench_insert_empty             ... bench:           1 ns/iter (+/- 0)
test tiny_list::test::bench_insert_one               ... bench:          16 ns/iter (+/- 0)
test tiny_list::test::bench_remove_empty             ... bench:           0 ns/iter (+/- 0)
test tiny_list::test::bench_remove_one               ... bench:           3 ns/iter (+/- 0)
test tiny_list::test::bench_remove_unknown           ... bench:           2 ns/iter (+/- 0)
```
@rust-highfive

This comment has been minimized.

Collaborator

rust-highfive commented Aug 2, 2018

r? @varkor

(rust_highfive has picked a reviewer for you, use r? to override)

@varkor

This comment has been minimized.

Member

varkor commented Aug 3, 2018

Thanks! @bors r+

@bors

This comment has been minimized.

Contributor

bors commented Aug 3, 2018

📌 Commit 4471537 has been approved by varkor

cramertj added a commit to cramertj/rust that referenced this pull request Aug 3, 2018

Rollup merge of rust-lang#52997 - llogiq:tiny-list-opt, r=varkor
data_structures: make TinyList more readable and optimize remove(_)

also add benchmarks

Before:

```
test tiny_list::test::bench_insert_empty             ... bench:           1 ns/iter (+/- 0)
test tiny_list::test::bench_insert_one               ... bench:          16 ns/iter (+/- 0)
test tiny_list::test::bench_remove_empty             ... bench:           2 ns/iter (+/- 0)
test tiny_list::test::bench_remove_one               ... bench:           6 ns/iter (+/- 0)
test tiny_list::test::bench_remove_unknown           ... bench:           4 ns/iter (+/- 0)
```

After:

```
test tiny_list::test::bench_insert_empty             ... bench:           1 ns/iter (+/- 0)
test tiny_list::test::bench_insert_one               ... bench:          16 ns/iter (+/- 0)
test tiny_list::test::bench_remove_empty             ... bench:           0 ns/iter (+/- 0)
test tiny_list::test::bench_remove_one               ... bench:           3 ns/iter (+/- 0)
test tiny_list::test::bench_remove_unknown           ... bench:           2 ns/iter (+/- 0)
```

bors added a commit that referenced this pull request Aug 3, 2018

Auto merge of #53049 - cramertj:rollup, r=cramertj
Rollup of 14 pull requests

Successful merges:

 - #52872 (Make IpvXAddr::new const fns and the well known addresses associated constants)
 - #52927 (Crate store cleanup)
 - #52940 (Align 6-week cycle check with beta promotion instead of stable release.)
 - #52959 ([NLL] Use smaller spans for errors involving closure captures)
 - #52969 (rustbuild: fix local_rebuild)
 - #52983 (Update LLVM submodule to 7.0)
 - #52995 (Remove unnecessary local in await! generator)
 - #52996 (RELEASES.md: fix the `hash_map::Entry::or_default` link)
 - #52997 (data_structures: make TinyList more readable and optimize remove(_))
 - #53002 (make `everybody_loops` preserve item declarations)
 - #53003 (Stabilize --color and --error-format options in rustdoc)
 - #53022 (volatile operations docs: clarify that this does not help wrt. concurrency)
 - #53024 (Specify reentrancy gurantees of `Once::call_once`)
 - #53041 (Fix invalid code css rule)

Failed merges:

r? @ghost
@bors

This comment has been minimized.

Contributor

bors commented Aug 5, 2018

⌛️ Testing commit 4471537 with merge e9fa9f5...

bors added a commit that referenced this pull request Aug 5, 2018

Auto merge of #52997 - llogiq:tiny-list-opt, r=varkor
data_structures: make TinyList more readable and optimize remove(_)

also add benchmarks

Before:

```
test tiny_list::test::bench_insert_empty             ... bench:           1 ns/iter (+/- 0)
test tiny_list::test::bench_insert_one               ... bench:          16 ns/iter (+/- 0)
test tiny_list::test::bench_remove_empty             ... bench:           2 ns/iter (+/- 0)
test tiny_list::test::bench_remove_one               ... bench:           6 ns/iter (+/- 0)
test tiny_list::test::bench_remove_unknown           ... bench:           4 ns/iter (+/- 0)
```

After:

```
test tiny_list::test::bench_insert_empty             ... bench:           1 ns/iter (+/- 0)
test tiny_list::test::bench_insert_one               ... bench:          16 ns/iter (+/- 0)
test tiny_list::test::bench_remove_empty             ... bench:           0 ns/iter (+/- 0)
test tiny_list::test::bench_remove_one               ... bench:           3 ns/iter (+/- 0)
test tiny_list::test::bench_remove_unknown           ... bench:           2 ns/iter (+/- 0)
```
@bors

This comment has been minimized.

Contributor

bors commented Aug 6, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: varkor
Pushing e9fa9f5 to master...

@bors bors merged commit 4471537 into rust-lang:master Aug 6, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details

@llogiq llogiq deleted the llogiq:tiny-list-opt branch Aug 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment