cessen / str_indices

Count and convert between various ways of indexing utf8 string slices.
Apache License 2.0
16 stars 5 forks source link

Don't use SIMD in miri #11

Closed Noratrieb closed 2 years ago

Noratrieb commented 2 years ago

For ropey#61.

It would be more ideal to add support for these arch specific simd intrinsics to miri, but for now just don't use it.

cessen commented 2 years ago

Thanks for this! However, this isn't what I was suggesting in https://github.com/cessen/ropey/pull/61. Rather, I want to add a simd feature flag, and then use that feature flag to disable simd in CI for miri.

This is for a couple of reasons:

  1. Some users may want to disable SIMD themselves, for safety or other reasons. And a feature flag would address that as well.
  2. Less importantly, it won't require revisiting the code if miri eventually gets support for x86/64 sse instructions—just a simple CI configuration change.

I'll actually take care of that myself later today, and ping you here when it's done.

cessen commented 2 years ago

Just published v0.4.0 to crates.io with the "simd" feature flag added. It's enabled by default, but if disabled won't use simd and will instead fall back to the vanilla Rust scalar implementation.