Clinton Ingram
saucecontrol.us
Clinton Ingram
@saucecontrol.us
The NAOT thing makes things difficult for library authors because we don't choose what gets IsSupported compiled to a constant -- it's up to the consuming project. By default SSE2 is all you get as constant, everything above is runtime check. Consumer can pick a higher baseline and make more free.
November 25, 2024 at 8:10 AM
There's a secondary issue with NAOT where the IsSupported checks are actual runtime lookups instead of being folded to constant as JIT does, so those things that have platform checks actually become more expensive.
November 25, 2024 at 8:01 AM
It's tricky. Intrinsics are treated differently by JIT (e.g. higher inlining preference), so implementing the xplat surface in C# would result in poorer perf.
November 25, 2024 at 8:00 AM
Glad you enjoyed it!
There are really two separate shuffle issues. The first is that if the mask register isn't constant, you always get slow code. The fix for that is a new API: github.com/dotnet/runti....
Second issue is that even constants aren't always recognized. Both are still in net9.0.
November 25, 2024 at 7:29 AM
Oof, I hear that's one of the most painful things one can experience. Hope you're ok.
November 24, 2024 at 1:09 AM