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

Add explicit SIMD for aarch64 platforms. #10

Closed
cessen opened this issue Apr 5, 2022 · 2 comments · Fixed by #12
Closed

Add explicit SIMD for aarch64 platforms. #10

cessen opened this issue Apr 5, 2022 · 2 comments · Fixed by #12

Comments

@cessen
Copy link
Owner

cessen commented Apr 5, 2022

Aarch64 simd intrinsics are stable as of Rust 1.59 (although due to a documentation bug are falsely still marked as unstable: rust-lang/stdarch#1268). This means we can now add proper SIMD acceleration for those platforms.

I don't currently have an aarch64 system to test on, so I won't attempt to implement myself. But if anyone would like to take a crack at it, it mostly just consists of making a new impl of the ByteChunk trait in src/byte_chunk.rs for the appropriate core::arch::aarch64 type. Although there may be some complexities with CPU features, etc.

@CeleritasCelery
Copy link
Contributor

CeleritasCelery commented Feb 1, 2023

I took the initiative to implement this on Aarch64 on my M1.

CeleritasCelery@2757d69

The tests pass and the fuzzer didn't find anything, but this code is significantly slower then the previous non-SIMD version 😢.

here is the results. We have 29 improvements (around 2x), and 79 regressions (2-10x).

I am at a loss to explain the slow down. Would you be able to take a look and see if I got something fundamentally wrong?

@cessen
Copy link
Owner Author

cessen commented Feb 1, 2023

Thanks so much for taking a crack at this!

If you just want to submit a WIP PR directly, that would be fine. Even if it isn't up to snuff yet, that will make reviewing it a little easier.

Either way, I'll try to get to it within the next couple of weeks.

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 a pull request may close this issue.

2 participants