Use safe_arch
https://github.com/Lokathor/safe_arch https://crates.io/crates/safe_arch
This allows using platform-specific SIMD instructions without using unsafe. Quite a lot of the functions are not available now but we can wait. There is quite a bit of blocking list in https://github.com/Lokathor/safe_arch/issues/44
I believe we should also investigate if this creates a performance regression on compile-time and run-time.
That generally looks cool, that said I'm a bit concerned about the change in naming for functions. It will make SIMD code a lot harder to share or keep in sync with other projects (especially with upstream simd-json) where now translating is mostly about a bit of rustyfing it but if all the intrinsic names change it'd could be a nightmare to keep them aligned.
Change in naming for functions. Oh, I am not aware of that but I didn't check if they change their naming ~~, IIRC they use the same naming~~. They did changed the naming but now I believe it should be type-safe.
But still, I wish to see this in standard library, I don't see the need of unsafe when cfg already filtering out the needed arch for the function to be used.
hi all, it's me. I'm close to releasing a 0.6 of safe_arch which will eliminate nearly all the macros and switch over to min-const-generics.
While the names used by safe_arch aren't 100% identical to the actual intrinsic names, they are close enough that the simd code should be entirely obvious to anyone who is remotely familiar with what's going on.
however, i'm here to tell you that the portable simd working group is started, and that some day they'll be the best way to use most simd related stuff. so if you can hold out a while longer you might as well just use that.