chacha20_poly1305: remove alignment

* Benchmarks showed that on recent versions of the rust compiler,
alignment settings could hurt and never helped.
This commit is contained in:
Nick Johnson 2025-02-19 10:48:17 -08:00
parent 36d45bf360
commit dadd1d7224
No known key found for this signature in database
GPG Key ID: 97B34267D0DBC8BF
1 changed files with 0 additions and 2 deletions

View File

@ -60,12 +60,10 @@ impl UpTo3<3> for () {}
/// * For-each loops are easy for the compiler to recognize as vectorizable. /// * For-each loops are easy for the compiler to recognize as vectorizable.
/// * The type is a based on an array instead of tuple since the heterogeneous /// * The type is a based on an array instead of tuple since the heterogeneous
/// nature of tuples can confuse the compiler into thinking it is not vectorizable. /// nature of tuples can confuse the compiler into thinking it is not vectorizable.
/// * Memory alignment lines up with SIMD size.
/// ///
/// In the future, a "blacklist" for the alignment option might be useful to /// In the future, a "blacklist" for the alignment option might be useful to
/// disable it on architectures which definitely do not support SIMD in order to avoid /// disable it on architectures which definitely do not support SIMD in order to avoid
/// needless memory inefficientcies. /// needless memory inefficientcies.
#[repr(align(16))]
#[derive(Clone, Copy, PartialEq)] #[derive(Clone, Copy, PartialEq)]
struct U32x4([u32; 4]); struct U32x4([u32; 4]);