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 portable simd (core::simd) implementation #83

Merged
merged 47 commits into from
Oct 15, 2024

Conversation

Licenser
Copy link
Contributor

@Licenser Licenser commented Oct 18, 2023

This adds experimental 128- and 256-bit core::simd (rusts portable simd) implementations. Since portable simd is a nightly-only feature, it is guarded behind the portable_public_imp feature flag. The implementations are accessible via the simdutf8::basic::imp::portable::simd128 and simdutf8::basic::imp::portable::simd256 modules.

@hkratz
Copy link
Contributor

hkratz commented Sep 23, 2024

@Licenser Sorry for being unresponsive for the last year. Now I am finally picking up on this. I hope you don't mind me fixing it up a bit before merging.

@Licenser
Copy link
Contributor Author

Licenser commented Sep 23, 2024

Hey, no worries, I've been doing OSS for long enough to have all the understanding in the world for things taking time :)

@hkratz
Copy link
Contributor

hkratz commented Sep 29, 2024

@Licenser Using a 128-bit wide portable simd implementation is only a few percent slower on ARM64 than the implementation using native intrinsics:

CleanShot 2024-09-29 at 13 12 22@2x

@hkratz hkratz self-assigned this Sep 29, 2024
@Licenser
Copy link
Contributor Author

That's pretty neat!

@hkratz
Copy link
Contributor

hkratz commented Oct 15, 2024

@Licenser I will be merging this but I might create an experimental #![forbid(unsafe_code)] simdutf8-portable crate as well.

@hkratz hkratz merged commit 642fc0e into rusticstuff:main Oct 15, 2024
275 checks passed
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.

2 participants