-
Notifications
You must be signed in to change notification settings - Fork 605
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
Question: Using SIMD in Image? #2077
Comments
Portable SIMD isn't available in stable Rust yet, so any use would have to be behind an unstable feature flag as we did for the png crate. (And even once it stabilizes we'd still have to wait until it was present in our MSRV before enabling it by default.) The other consideration is that manually using SIMD has to be "worth it". The Rust compiler is very good at auto-vectorization so that should always be attempted first. And even when that's not possible, there has to be an impactful enough performance difference to justify making the code more complex. |
sounds good, for now I'll avoid using it, but I'll try to fix up the code so that it's more amenable to optimization. |
@JulianKnodt note that I've been banging my head for two hours on why the compiler won't autovectorize something, and it turned out that I was using |
ah I didn't realize that, but I've updated the interpolation code to be more efficient in the unoptimized case, which is probably still good in the vectorized case: #2078 |
Currently, I'm attempting to optimize bilinear interpolation, and have noticed there's some opportunities for SIMD, but I was wondering whether it would be ok to use portable SIMD (
std::simd
) inside the library?The text was updated successfully, but these errors were encountered: