The Rust 1.78.0 release includes an upgrade to bundled LLVM 18, completing the u128/i128 alignment change for x86 architectures, potentially improving runtime performance for 128-bit integers. A discrepancy in alignment between Rust and C conventions can lead to degraded performance due to misalignment issues on x86 architectures. By enforcing proper alignment, performance improvements were observed, reducing cache misses and improving RAM accesses. Performance gains were consistent across ordered, reversed, and randomized access scenarios. The update to 1.78.0 resolved the alignment issue, leading to a 10% performance increase. Continuous performance testing in CI environments is key to making informed optimization decisions.
https://codspeed.io/blog/rust-1-78-performance-impact-of-the-128-bit-memory-alignment-fix