AFAIK, auto-vectorization has the same limitation in Rust as in C and C++ - it cannot be required. Hence, it is very easy to break the vectorization in brittle ways, without even noticing the issue.
It would be nice to have a sort of autovec-or-error annotation for preventing this.
TL;DR: An introduction to Rust which starts with a Rust-unsafe C program, writing a Rust equivalent, then evolves it towards some of the higher-level abstractions in Rust.
(As opposed to the non-dangerous way which means writing safe code to begin with and mentioning unsafe as the exception)
AFAIK, auto-vectorization has the same limitation in Rust as in C and C++ - it cannot be required. Hence, it is very easy to break the vectorization in brittle ways, without even noticing the issue.
It would be nice to have a sort of autovec-or-error annotation for preventing this.
TL;DR: An introduction to Rust which starts with a Rust-unsafe C program, writing a Rust equivalent, then evolves it towards some of the higher-level abstractions in Rust.
(As opposed to the non-dangerous way which means writing safe code to begin with and mentioning unsafe as the exception)
To complete the TL;DR : the safe Rust code is at 97% the speed of the C code, if keeping manual vectorization.