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

BTreeMap: better way to postpone root access in DrainFilter #75257

Merged
merged 1 commit into from
Aug 8, 2020

Conversation

ssomers
Copy link
Contributor

@ssomers ssomers commented Aug 7, 2020

A slightly more elegant (in my opinion) adaptation of #74762. Benchmarks seem irrationally pleased to:

benchcmp old new --threshold 5
 name                                           old ns/iter  new ns/iter  diff ns/iter   diff %  speedup
 btree::map::clone_fat_100_and_remove_all       215,182      185,052           -30,130  -14.00%   x 1.16
 btree::map::clone_fat_100_and_remove_half      139,667      127,945           -11,722   -8.39%   x 1.09
 btree::map::clone_fat_val_100_and_remove_all   96,755       81,279            -15,476  -16.00%   x 1.19
 btree::map::clone_fat_val_100_and_remove_half  64,678       56,911             -7,767  -12.01%   x 1.14
 btree::map::find_rand_100                      18           17                     -1   -5.56%   x 1.06
 btree::map::first_and_last_0                   33           35                      2    6.06%   x 0.94
 btree::map::first_and_last_100                 40           54                     14   35.00%   x 0.74
 btree::map::insert_rand_100                    45           42                     -3   -6.67%   x 1.07
 btree::map::insert_rand_10_000                 45           41                     -4   -8.89%   x 1.10
 btree::map::iter_0                             2,010        1,759                -251  -12.49%   x 1.14
 btree::map::iter_100                           3,514        2,764                -750  -21.34%   x 1.27
 btree::map::iter_10k                           4,018        3,768                -250   -6.22%   x 1.07
 btree::map::range_unbounded_unbounded          37,269       28,929             -8,340  -22.38%   x 1.29
 btree::map::range_unbounded_vs_iter            31,518       28,814             -2,704   -8.58%   x 1.09

r? @Mark-Simulacrum

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 7, 2020
@Mark-Simulacrum
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Aug 7, 2020

📌 Commit 85a7879 has been approved by Mark-Simulacrum

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 7, 2020
@bors
Copy link
Contributor

bors commented Aug 8, 2020

⌛ Testing commit 85a7879 with merge d19d7e2...

@bors
Copy link
Contributor

bors commented Aug 8, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: Mark-Simulacrum
Pushing d19d7e2 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 8, 2020
@bors bors merged commit d19d7e2 into rust-lang:master Aug 8, 2020
@ssomers ssomers deleted the btree_74762_again branch August 8, 2020 09:51
ssomers added a commit to ssomers/rust that referenced this pull request Aug 13, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 15, 2020
…mulacrum

Revert the fundamental changes in rust-lang#74762 and rust-lang#75257

Before possibly going over to rust-lang#75487. Also contains some added and fixed comments.

r? @Mark-Simulacrum
@cuviper cuviper added this to the 1.47.0 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants