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

AVX2 #122

Open
p0nce opened this issue Feb 5, 2023 · 2 comments
Open

AVX2 #122

p0nce opened this issue Feb 5, 2023 · 2 comments

Comments

@p0nce
Copy link
Collaborator

p0nce commented Feb 5, 2023

179 TODO
159 TODO
142 TODO
132 TODO
112 TODO
100 TODO
87 TODO
76 TODO
62 TODO
49 TODO

@p0nce
Copy link
Collaborator Author

p0nce commented Apr 7, 2023

AVX super annoying to do since efficiently doing the instructions without 256-bit vectors is involved

@p0nce
Copy link
Collaborator Author

p0nce commented May 23, 2023

Even when AVX is disabled, if all intrinsics are implement with proper splitting when needed, you can speed up with AVX "intrinsics". Of course, doesn't work everytime but often enough to speed things up in general.

Let's measure time to make 81920000 atan2 operations.

With -mattr=+avx2 (AVX enabled)

- Naive (std.complex.arg):       1581.3 ms
- Written with AVX intrinsics:     61.5 ms
- Written with SSE intrinsics:    103.6 ms


Without -mattr=+avx2 (AVX disabled)

- Naive (std.complex.arg):       1499.6 ms
- Written with AVX intrinsics:    102.9 ms
- Written with SSE intrinsics:    119.9 ms

(EDIT: though, it's not systematic either, if SSE intrinsics don't win over D code often the AVX semantics also don't win)

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

No branches or pull requests

1 participant