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

Investigate perf difference between multiple SetAllVector128 and a Load + Permute sequence #27166

Closed
tannergooding opened this issue Aug 17, 2018 · 4 comments
Milestone

Comments

@tannergooding
Copy link
Member

As per the comment here: dotnet/corefx#31779 (comment)

I would expect that an explicit Load + four Permute operations (for four sequential memory addresses) would be faster than (or at least as fast as) four SetAllVector128 (which should be equivalent to four loads and four permutes).

Investigate the codegen between the two to see if there is some bug blocking this optimization.

@tannergooding tannergooding self-assigned this Aug 17, 2018
@tannergooding
Copy link
Member Author

CC. @fiigii, @eerhardt, @CarolEidt

Also CC. @EgorBo

@tannergooding
Copy link
Member Author

I've self assigned and should get to this on Monday.

@EgorBo
Copy link
Member

EgorBo commented Aug 17, 2018

@tannergooding turns out I was benchmarking that test on some old 2.1 runtime, with the latest 3.0 Shuffle is 20% faster.
JIT output:
Multiply-SetAllVector.cs: https://gist.github.com/EgorBo/84ae4be8f4a8024548615e486e603962
Multiply-Shuffle.cs: https://gist.github.com/EgorBo/c44417038ad56e8ec145ea1945257a36
C#: https://gist.github.com/EgorBo/e2717606fdc4c3a14a7fa16617f87ad8

@tannergooding
Copy link
Member Author

Thanks for the update @EgorBo!

@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the 3.0 milestone Jan 31, 2020
@tannergooding tannergooding removed their assignment May 26, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants