3 ms·
Don't miss the 2023! The article really is already a little outdated: since Rust 1.78, the compiler uses some more aggressive loop unrolling (and a little bit o
by croemer 2y ago
Don't miss the 2023! The article really is already a little outdated: since Rust 1.78, the compiler uses some more aggressive loop unrolling (and a little bit of SIMD): https://godbolt.org/z/zhbobW7rr https://godbolt.org/z/zhbobW7rr
OP wrote: "Looking at the assembly, it's doing some loop unrolling.", linking to https://godbolt.org/z/Kv77abW6c https://godbolt.org/z/Kv77abW6c, which is using "Rust Nightly", a moving target. By now, there's more loop unrolling.
Loop unrolling started with Rust 1.59: https://godbolt.org/z/5PTnWrWf7 https://godbolt.org/z/5PTnWrWf7
Update: The code on Github shows they were using Rust version 1.67.0-nightly, 2022-11-27.
- croemer 2y agoRust 1.67.0, which is likely what OP was looking at, gives: https://godbolt.org/z/4Y61d9seh https://godbolt.org/z/4Y61d9seh I ran the benchmarks locally on the same hardware, using latest nightly Rust 1.81 (aggressive loop unrolling): no difference. Same speed as 1.5 years ago.
- mkeeter 2y agoGood catch, I've updated the link to select Rust 1.67 specifically!