Skip to content

Optimize AtomicBool::fetch_nand - #41143

Merged
bors merged 2 commits into
masterfrom
unknown repository
Apr 8, 2017
Merged

Optimize AtomicBool::fetch_nand#41143
bors merged 2 commits into
masterfrom
unknown repository

Conversation

@ghost

@ghostghost commented Apr 7, 2017

Copy link
Copy Markdown

This is an attempt to push the PR #40563 to completion.

Benchmark: source
Improvement:

 name old_ ns/iter new_ce_ ns/iter diff ns/iter diff % 1t 146,440 89,904 -56,536 -38.61% 2t 561,456 316,835 -244,621 -43.57% 4t 2,822,821 1,005,424 -1,817,397 -64.38% 

r? @eddyb
cc @alexcrichton@nagisa

@nagisa

Copy link
Copy Markdown
Member

The difference between swap and compare_exchange in previous benchmark seemed like something that would be within error, with swap implementation being significantly easier to comprehend.

I would r+ if CAS was replaced with swap.

@ghost

ghost commented Apr 7, 2017

Copy link
Copy Markdown
Author

@nagisa Fair enough. Replaced CAS with swap.

Yeah, CAS and swap are equally performant according to the benchmarks.

@eddyb

eddyb commented Apr 7, 2017

Copy link
Copy Markdown
Contributor

@bors r=nagisa

@bors

bors commented Apr 7, 2017

Copy link
Copy Markdown
Collaborator

📌 Commit f7ffe5b has been approved by nagisa

@bors

bors commented Apr 7, 2017

Copy link
Copy Markdown
Collaborator

⌛ Testing commit f7ffe5b with merge df15b21...

@bors

bors commented Apr 7, 2017

Copy link
Copy Markdown
Collaborator

💔 Test failed - status-appveyor

@TimNN

TimNN commented Apr 7, 2017

Copy link
Copy Markdown
Contributor

@bors retry

@bors

bors commented Apr 7, 2017

Copy link
Copy Markdown
Collaborator

⌛ Testing commit f7ffe5b with merge 9b29afe...

@bors

bors commented Apr 7, 2017

Copy link
Copy Markdown
Collaborator

💔 Test failed - status-appveyor

@TimNN

TimNN commented Apr 7, 2017

Copy link
Copy Markdown
Contributor

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Apr 7, 2017
…r=nagisa
Optimize AtomicBool::fetch_nand
This is an attempt to push the PR rust-lang#40563 to completion.
Benchmark: [source](https://gist.github.com/stjepang/023f5025623f5474184f9f4dfd6379ae)
Improvement:
```
name old_ ns/iter new_ce_ ns/iter diff ns/iter diff %
1t 146,440 89,904 -56,536 -38.61%
2t 561,456 316,835 -244,621 -43.57%
4t 2,822,821 1,005,424 -1,817,397 -64.38%
```
r? @eddyb
cc @alexcrichton@nagisa
@frewsxcvfrewsxcv mentioned this pull request Apr 7, 2017
bors added a commit that referenced this pull request Apr 8, 2017
Rollup of 3 pull requests
- Successful merges: #41135, #41143, #41146
- Failed merges:
@bors

bors commented Apr 8, 2017

Copy link
Copy Markdown
Collaborator

⌛ Testing commit f7ffe5b with merge a05813d...

@bors

bors commented Apr 8, 2017

Copy link
Copy Markdown
Collaborator

💔 Test failed - status-appveyor

@TimNN

TimNN commented Apr 8, 2017

Copy link
Copy Markdown
Contributor

TimNN added a commit to TimNN/rust that referenced this pull request Apr 8, 2017
…r=nagisa
Optimize AtomicBool::fetch_nand
This is an attempt to push the PR rust-lang#40563 to completion.
Benchmark: [source](https://gist.github.com/stjepang/023f5025623f5474184f9f4dfd6379ae)
Improvement:
```
name old_ ns/iter new_ce_ ns/iter diff ns/iter diff %
1t 146,440 89,904 -56,536 -38.61%
2t 561,456 316,835 -244,621 -43.57%
4t 2,822,821 1,005,424 -1,817,397 -64.38%
```
r? @eddyb
cc @alexcrichton@nagisa
@TimNNTimNN mentioned this pull request Apr 8, 2017
bors added a commit that referenced this pull request Apr 8, 2017
Rollup of 4 pull requests
- Successful merges: #41135, #41143, #41146, #41152
- Failed merges:
@bors
bors merged commit f7ffe5b into rust-lang:masterApr 8, 2017
@ghost
ghost deleted the optimize-bool-fetch-nand branch April 8, 2017 09:57
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@nagisa@eddyb@bors@TimNN