Optimize AtomicBool::fetch_nand#41143
Conversation
|
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. |
|
@nagisa Fair enough. Replaced CAS with swap. Yeah, CAS and swap are equally performant according to the benchmarks. |
|
@bors r=nagisa |
|
📌 Commit f7ffe5b has been approved by |
|
⌛ Testing commit f7ffe5b with merge df15b21... |
|
💔 Test failed - status-appveyor |
|
@bors retry |
|
⌛ Testing commit f7ffe5b with merge 9b29afe... |
|
💔 Test failed - status-appveyor |
…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
|
⌛ Testing commit f7ffe5b with merge a05813d... |
|
💔 Test failed - status-appveyor |
…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
This is an attempt to push the PR #40563 to completion.
Benchmark: source
Improvement:
r? @eddyb
cc @alexcrichton @nagisa