llogiq / bytecount

Counting occurrences of a given byte or UTF-8 characters in a slice of memory – fast
Apache License 2.0
225 stars 26 forks source link

remove `packed_simd` in favor of `std::simd` and `#![feature(portable_simd)]` #92

Closed ytmimi closed 6 months ago

ytmimi commented 6 months ago

Fixes #91

As mentioned in the packed_simd README, the crate is superseded by #![feature(portable_simd)].

I'm honestly not familiar with simd or the new std::simd support, but I think I managed to get things working without the use of packed_simd (at least from local testing).

ytmimi commented 6 months ago

Based on this comment it also seems that packed_simd isn't being actively maintained, so that might be another reason to stop using it.

llogiq commented 6 months ago

For now, I think we have all the relevant platforms (but riscv, need to get my hands on one of those...), so this isn't that relevant anymore. Still it's good to go with the times, so thank you for your contribution!

ytmimi commented 6 months ago

Happy to help 😁!

bytecount is one of rustfmt's dependencies so when I noticed the generic-simd feature wasn't working on nightly I wanted to try and get it resolved.

I also noticed that packed_simd is mentioned in the README, would you like me to update those docs as part of this PR too?

llogiq commented 6 months ago

That would be great.

ytmimi commented 6 months ago

@llogiq I've updated the docs. Let me know if there are any other changes you'd like to see

llogiq commented 6 months ago

No, that looks comprehensive. Thank you!