-
Notifications
You must be signed in to change notification settings - Fork 30
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
Investigate performance regression of ChaCha20 implementation #244
Comments
The BLAKE2b implementation uses the The assembly generated for https://godbolt.org/z/s6r8hM6sv Assembly bloat present in |
Reverting to a |
Checking Godbolt, we are getting the previous sizes of generated assembly for this unit (rustc The throughput should be measured again, to verify that performance has restored to acceptable levels. If that's the case, we can close this issue. |
Do we know if there's a Rust issue created for this regression yet? If not, they may want to be aware of it. Not sure if these kinds of regressions end up in a test suite somewhere. |
I haven't seen any when I looked. It was a bit ago last time I did however. I'm not sure what to specifically report, but if you're interested in doing so, feel free to. |
I am not able to reproduce the exact benchmarking setup originally used, but I'm now seeing 400-420 MiB/s throughput again, but unfortunately there's some noise on my current setup. I would say this to be back to near-original levels so we can close this. If it reappears or others report degraded performance, we can always repon this issue. |
The following changes in performance of ChaCha20 and related functions have been observed:
rustc 1.41.0 (5e1a79984 2020-01-27)
,orion 0.15.0
:rustc 1.56.0 (09c42c458 2021-10-18)
,orion 0.16.1
:The change in performance was only observed on an Intel(R) Core(TM) i7-4790K CPU machine. No regression was found on the Raspberry Pi 2 Model B V1.1 used to benchmark. When running
cargo bench
withorion v0.15.0
andrustc 1.56.0 (09c42c458 2021-10-18)
, the same regressions are shown.It doesn't seem like any major changes were introduced in the ChaCha20 implementation between these versions, when inspecting
git log
. This, and that regression persists between different versions of Orion, tells us its most likely due to changes outside of this crate.Further things to investigate:
rustc
versions1.41.0
to1.56.0
(regression due to changes inrustc
, maybe LLVM upgrades?)The text was updated successfully, but these errors were encountered: