Benchmarks comparing Structure of Arrays (SoA) vs Array of Structures (AoS) performance in Rust.
cargo bench
RUSTFLAGS='-C target-cpu=native' cargo bench
cargo bench --bench my_benchmark
cargo bench --bench auto_optimisation_benchmark
# Run only AoS benchmarks
cargo bench "AoS"
# Run only SoA benchmarks
cargo bench "SoA"
# Run only SIMD benchmarks
cargo bench "SIMD"
# Run SIMD width comparison
cargo bench "SIMD x"
# Run specific benchmark
cargo bench "SoA Update (zip)"
- my_benchmark.rs: Core SoA vs AoS comparison including SIMD variants
- auto_optimisation_benchmark.rs: Tests compiler optimization behavior
- AoS Update: Traditional struct-based particle updates
- SoA Update: Array-based particle updates (better cache locality)
- SoA Update (zip): Idiomatic Rust with iterator zipping
- SIMD variants: Manual SIMD implementations at different widths (x4, x8, x16, x32)