2 ms·
rustc also doesn't vectorize it?
by totalperspectiv 7y ago
rustc also doesn't vectorize it?
- masklinn 7y agoIt does if you use iterators as totalperspectiv did in their alternate version https://godbolt.org/z/JpwcRN https://godbolt.org/z/JpwcRN Because Rust bounds-checks indexes, which likely breaks LLVM's vectorisation (you'd have to reimplement vectorisation & vectorised bounds-checking in MIR for it to work I guess e.g. bounds-check the entire chunk before applying the vectorised operation).