kookamamie 2 minutes ago

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.

einpoklum 20 minutes ago

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)

  • Epholys 13 minutes ago

    To complete the TL;DR : the safe Rust code is at 97% the speed of the C code, if keeping manual vectorization.