divviup / libprio-rs

Implementation of Prio in Rust.
Mozilla Public License 2.0
103 stars 31 forks source link

Try marking ct_eq, conditional_select, conditional_negate with `#[inline]` #1088

Open divergentdave opened 5 months ago

divergentdave commented 5 months ago

Reviewing recent changes to the subtle crate brought it to my attention that the ConstantTimeEq, ConditionallySelectable, and ConditionallyNegatable traits suggest using the #[inline] attribute on implementations of their methods. This is recommended for performance reasons, see https://github.com/dalek-cryptography/subtle/pull/7/commits/5a8d66c5613981b9fce19ac0f9e908ec78fe4307. We should try this out, particularly on shorter such methods, and see if it has a meaningful impact on benchmarks.