From dadd1d72248015450fe6f898cd999ac54ff34aec Mon Sep 17 00:00:00 2001 From: Nick Johnson Date: Wed, 19 Feb 2025 10:48:17 -0800 Subject: [PATCH] chacha20_poly1305: remove alignment * Benchmarks showed that on recent versions of the rust compiler, alignment settings could hurt and never helped. --- chacha20_poly1305/src/chacha20.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/chacha20_poly1305/src/chacha20.rs b/chacha20_poly1305/src/chacha20.rs index cde412d0a..48eb310bf 100644 --- a/chacha20_poly1305/src/chacha20.rs +++ b/chacha20_poly1305/src/chacha20.rs @@ -60,12 +60,10 @@ impl UpTo3<3> for () {} /// * 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 /// 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 /// disable it on architectures which definitely do not support SIMD in order to avoid /// needless memory inefficientcies. -#[repr(align(16))] #[derive(Clone, Copy, PartialEq)] struct U32x4([u32; 4]);