Skip to content
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

Verifying Auto-Vectorization for SIMD #1

Open
d2weber opened this issue Aug 25, 2021 · 2 comments
Open

Verifying Auto-Vectorization for SIMD #1

d2weber opened this issue Aug 25, 2021 · 2 comments

Comments

@d2weber
Copy link

d2weber commented Aug 25, 2021

// To take advantage of SIMD auto-vectorization, and for consistent parameter smoothing,

While reading though the dsp code, I was wondering if the chunking for auto-vectorization is necessary. While reading this blog post, I was wondering if the chunking might even prevent AVX SIMD optimization, compared to iterator-based loops.

I played around a bit: https://godbolt.org/z/YaYoW71jT
Add -C target-feature=+avx2 to enable AVX.

@antonok-edm
Copy link
Owner

I haven't actually done any checking of the generated assembly, so it's entirely possible I'm doing something wrong/inefficient here. I adapted the chunking logic from a synthesizer I've been working on, where I actually used manual vectorization everywhere since some of the calculations are much less trivial. Passing around chunks in that context was much easier to work with.

I'm not too concerned about it here because this is a pretty simple demo plugin, but if you can make it faster without making the code significantly more complex, I'm happy to accept a PR!

@d2weber
Copy link
Author

d2weber commented Aug 25, 2021

I will have a look at how process might be improved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants