|
Ran
|
Jobs
1
|
Files
130
|
Run time
1min
|
Badge
README BADGES
|
push
github
Merge rust-bitcoin/rust-bitcoin#4083: Improve chacha20 cipher performance <a class=hub.com/rust-bitcoin/rust-bitcoin/commit/<a class="double-link" href="https://git"><a class=hub.com/rust-bitcoin/rust-bitcoin/commit/1ca55ac77db698f3816d8b7ed4051ddb5a579a29">1ca55ac77<a href="https://github.com/rust-bitcoin/rust-bitcoin/commit/35a49993c8cc10132369b193a9c09a8e449159b6"> chacha20_poly1305: inline simd functions (Nick Johnson) <a class="double-link" href="https://github.com/rust-bitcoin/rust-bitcoin/commit/30920c4d849cf25ae3847b51380b90aa331f903f">30920c4d8</a><a href="https://github.com/rust-bitcoin/rust-bitcoin/commit/35a49993c8cc10132369b193a9c09a8e449159b6"> chacha20_poly1305: drop mutable requirement (Nick Johnson) </a><a class="double-link" href="https://github.com/rust-bitcoin/rust-bitcoin/commit/415945cd2b3f4bd40f6c15e359ea241ed7b4f2d4">415945cd2</a><a href="https://github.com/rust-bitcoin/rust-bitcoin/commit/35a49993c8cc10132369b193a9c09a8e449159b6"> chacha20_poly1305: avoid duplicate block work (Nick Johnson) </a><a class="double-link" href="https://github.com/rust-bitcoin/rust-bitcoin/commit/33dc1b95fa282ec1fe9706525f1a38ee611b7915">33dc1b95f</a><a href="https://github.com/rust-bitcoin/rust-bitcoin/commit/35a49993c8cc10132369b193a9c09a8e449159b6"> chacha20_poly1305: swap tuple for array (Nick Johnson) </a><a class="double-link" href="https://github.com/rust-bitcoin/rust-bitcoin/commit/dadd1d72248015450fe6f898cd999ac54ff34aec">dadd1d722</a><a href="https://github.com/rust-bitcoin/rust-bitcoin/commit/35a49993c8cc10132369b193a9c09a8e449159b6"> chacha20_poly1305: remove alignment (Nick Johnson) </a><a class="double-link" href="https://github.com/rust-bitcoin/rust-bitcoin/commit/36d45bf360b4fff069203a86e3429831babe5e5d">36d45bf36</a> chacha20_poly1305: remove mod operator (Nick Johnson) Pull request description: Inspired by JeremiahR's new benchmark on the chacha20 module, I dug in and found a few tweaks (and a larger refactor) which help a lot with performance. The tweaks are broken down by commit. One of the relatively fruitful ones (5% increase) was refactoring the U32x4's rotation methods to use hardcoded matches instead of the mod operator. Others saw more modest performance gains. The big change though was to *not* calculate two blocks for each keystream call (oops). I refactored the logic to handle the offset state (which is technically not required for BIP324, but as seen here, can be confusing to not have) and now we always calculate just the required amount of a keystream. This about doubles the performance. For the curious, the SIMD performance isn't very impressive at this point, just a modest increase. But I have some hope that the experimental core library U32x4 will bring a nice bump (it is implemented with some unsafe hacking) and be an easy refactor. ACKs for top commit: apoelstra: ACK 1ca55ac77db698f3816d8b7ed4051ddb5a579a29; successfully ran local tests tcharding: ACK 1ca55ac77db698f3816d8b7ed4051ddb5a579a29 Tree-SHA512: 8db1c6144d06b5cccdae233caf8f7019684
83 of 87 new or added lines in 2 files covered. (95.4%)
23334 of 27577 relevant lines covered (84.61%)
16053.34 hits per line
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 3 |
97.75 |
-0.79% | chacha20_poly1305/src/chacha20.rs |
| 1 |
56.38 |
0.0% | chacha20_poly1305/src/lib.rs |
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 15045337466.1 | 130 |
84.61 |
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|