-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expr: explicit SIMD #776
Comments
Bounds checking does not allow the compiler to auto-vectorize. Try and test |
yeah it works! https://godbolt.org/z/eG61feTM4 I'll check if binary operations are actually vectorized in RisingLight later... |
You can check them via |
I still prefer auto-vectorization over explicit SIMD, because usually compilers do it better than humans and it makes code cleaner. However, as mentioned above, auto-vectorization requires special craft of codes. There are plenty of things that prevent SIMD, e.g. bound check, branching. AFAIK, there's also no way to hint or ensure auto-vectorization for a piece of code in Rust, i.e. no equivalent for |
Yep, I also think auto vectorization |
… is good |
I've been working with some other database things recently and it seems that Rust compiler cannot automatically vectorize array-array operation.
https://godbolt.org/z/G8WMr4acY
Probably we should bring back the portable SIMD expressions framework?
The text was updated successfully, but these errors were encountered: