xxhash_cpp icon indicating copy to clipboard operation
xxhash_cpp copied to clipboard

Support for sse2neon.h on ARM Linux

Open whatoeatoday opened this issue 7 months ago • 3 comments

Hi, thank you for the great library!

I’m currently using xxhash on an ARM Linux system running Ubuntu 24.04, and I noticed that the current use of sse2neon.h seems to be limited to macOS ARM targets.

Looking at the source, sse2neon.h appears to be conditionally included only under APPLE or (aarch64 && APPLE).

Could you clarify why sse2neon.h is limited to macOS ARM in xxhash?

To my knowledge, sse2neon.h is platform-independent and works well on generic ARM64 Linux systems with NEON support — including Ubuntu 24.04.

If there’s no technical limitation, would you consider broadening the condition to include general ARM Linux platforms as well?

Thanks again for your great work!

whatoeatoday avatar May 22 '25 07:05 whatoeatoday

Thanks for making an issue about this. I don't have an ARM machine on hand to test it, but looking at the source code of the original xxhash just removing the check for APPLE should be fine. I made a branch with that change (mr-neon-not-apple-exclusive), could you run the unit tests locally and see if everything looks fine?

redspah avatar May 24 '25 16:05 redspah

I still see two tests of APPLE, line 198 and 754. Is it intentional to keep them?

fabrice-baray avatar Oct 27 '25 17:10 fabrice-baray

Nope, it is not, I must've missed those and forgot about them since the OP never responded.

redspah avatar Oct 27 '25 21:10 redspah