News for hackers. Stuff that matters.
Re:Making the obvious code fast (2016) by gameswithgo on Wednesday April 17, 2019 @08:36AM (#19681956)
Since I wrote this, Rust did stabilize SIMD intrinsics, and using crates like https://github.com/AdamNiederer/faster or https://github.com/jackmott/simdeez you can write pretty idiomatic code to leverage them too.

Also I believe the browsers have sped up some of the Javascript cases shown there substantially.

Re:Making the obvious code fast (2016) by sambe on Wednesday April 17, 2019 @09:09AM (#19682177)
Does a more modern Rust/LLVM not auto-vectorize this?
Re:Making the obvious code fast (2016) by timerol on Wednesday April 17, 2019 @10:00AM (#19682603)
Yes. Rust 1.34.0 (and presumably earlier as well) generates an unrolled SIMD-loop for the iterator option: https://rust.godbolt.org/z/c6uZCv
Re:Making the obvious code fast (2016) by gameswithgo on Wednesday April 17, 2019 @02:19PM (#19685068)
It will with integers, but not floating point. All compilers will use simd registers and instructions for floating point but its only using the 1 lane there. its not really vectorized.

rust has no way to pass ffast-math flag (unless that changed recently) which will enable this for C/C++

Re:Making the obvious code fast (2016) by steveklabnik on Wednesday April 17, 2019 @02:56PM (#19685383)
The rust approach to this kind of this is not to use global flags to control this kind of behavior, but to use wrapping types to get the behavior on the spots where you want it: https://crates.io/crates/fast-floats
Re:Making the obvious code fast (2016) by ohazi on Thursday April 18, 2019 @04:43AM (#19689653)
Unrelated: Haven't used compiler explorer in a while and just got the "new privacy policy" overlay.

What a delightfully clear, complete, and readable privacy policy.