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

Vocoder plugin: refactor for speed #2089

Merged
merged 1 commit into from
Jul 8, 2015

Conversation

softrabbit
Copy link
Member

Changing from arrays of structs to structs of arrays makes the code a lot more optimizer-friendly, with possible speed gains of 2-3x when compiling for SSE systems.

(see https://github.com/softrabbit/filterbench/tree/master/vocoder for some benchmarking code)

Changing from arrays of structs to structs of arrays makes the
code a lot more optimizer-friendly, with possible speed gains of
2-3x when compiling for SSE systems.
@Wallacoloo
Copy link
Member

Wow, those are some significant performance gains!

I ran your benchmarks on my 64-bit Athlon II P320 (mobile processor from 2009 with SSE, SSE2, SSE3 and AMD's SSE4a):
gcc 4.9.1:

10.73 ./original
10.74 ./sse
5.38 ./optimized

clang 3.6.0 (modified your Makefile & removed the incompatible -fopt-info-vec-optimized flag) :

10.16 ./original
10.14 ./sse
5.59 ./optimized

So the improvements seem to generalize pretty well. And the outputs of the new version match the old for both gcc and clang builds.

Nicely done!

@curlymorphic
Copy link
Contributor

nice work @softrabbit , have you issued a pull request upstream?

@softrabbit
Copy link
Member Author

nice work @softrabbit , have you issued a pull request upstream?

Nope, not yet. AFAIK the version in LMMS is adapted a bit from the upstream version, so it's probably not a straight pull. And then there's the standalone JACK version, that might need similar treatment.

softrabbit added a commit that referenced this pull request Jul 8, 2015
Vocoder plugin: refactor for speed
@softrabbit softrabbit merged commit 87c1558 into LMMS:master Jul 8, 2015
@softrabbit softrabbit deleted the faster_vocoder branch March 25, 2017 17:29
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

Successfully merging this pull request may close these issues.

3 participants