zcash / pasta_curves

Rust implementation for zcash/pasta
Other
80 stars 49 forks source link

Add `uninline-portable` feature #47

Closed krnak closed 1 year ago

krnak commented 2 years ago

Adds uninline-portable feature flag, which disables inlining of some functions. This is useful for tiny microchips (such as ARM Cortex-M0), where inlining can hurt performance and blow up binary size.

Inspired by blake2b_simd/uninline_portable feature.

Saves 3 kb of space on Trezor T, where we definitely want to use this crate.

codecov-commenter commented 2 years ago

Codecov Report

Base: 66.15% // Head: 59.88% // Decreases project coverage by -6.26% :warning:

Coverage data is based on head (b889295) compared to base (682a0e6). Patch has no changes to coverable lines.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #47 +/- ## ========================================== - Coverage 66.15% 59.88% -6.27% ========================================== Files 12 10 -2 Lines 1427 1199 -228 ========================================== - Hits 944 718 -226 + Misses 483 481 -2 ``` | [Impacted Files](https://codecov.io/gh/zcash/pasta_curves/pull/47?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zcash) | Coverage Δ | | |---|---|---| | [src/fields/fp.rs](https://codecov.io/gh/zcash/pasta_curves/pull/47/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zcash#diff-c3JjL2ZpZWxkcy9mcC5ycw==) | `76.07% <ø> (-4.22%)` | :arrow_down: | | [src/fields/fq.rs](https://codecov.io/gh/zcash/pasta_curves/pull/47/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zcash#diff-c3JjL2ZpZWxkcy9mcS5ycw==) | `75.35% <ø> (-4.36%)` | :arrow_down: | | [src/lib.rs](https://codecov.io/gh/zcash/pasta_curves/pull/47/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zcash#diff-c3JjL2xpYi5ycw==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: | | [src/macros.rs](https://codecov.io/gh/zcash/pasta_curves/pull/47/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zcash#diff-c3JjL21hY3Jvcy5ycw==) | `51.61% <0.00%> (-1.73%)` | :arrow_down: | | [src/vesta.rs](https://codecov.io/gh/zcash/pasta_curves/pull/47/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zcash#diff-c3JjL3Zlc3RhLnJz) | | | | [src/pallas.rs](https://codecov.io/gh/zcash/pasta_curves/pull/47/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zcash#diff-c3JjL3BhbGxhcy5ycw==) | | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zcash). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zcash)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

krnak commented 1 year ago

Tested again. This saves 3584 bytes on Trezor T.