Open str4d opened 1 year ago
Base: 66.15% // Head: 60.44% // Decreases project coverage by -5.71%
:warning:
Coverage data is based on head (
9b4bfa5
) compared to base (682a0e6
). Patch coverage: 100.00% of modified lines in pull request are covered.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Hmm, this implementation does not appear to be more efficient. I ran:
$ rustc +stable --version
rustc 1.64.0 (a55dd71d5 2022-09-19)
$ cargo +stable asm --lib "<pasta_curves::fields::fp::Fp as ff::Field>::double"
once on current main
and again on this PR, and got the following assembly:
It looks to me like rustc
and LLVM
are able to optimise the self.add(self)
implementation down to basically the same assembly as the manual bitshifting implementation, while the latter causes a couple of additional assembly instructions to be generated.
Extracted from https://github.com/zcash/pasta_curves/pull/44.