4 ms·
> Some of this is isel Yes, and it's not constrained by whatever lowest common denominator was chosen at the moment of publishing the application or library.
by neonsunset 2y ago
> Some of this is isel
Yes, and it's not constrained by whatever lowest common denominator was chosen at the moment of publishing the application or library.
Anyway
https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/Buffers/Text/Base64Url/Base64UrlEncoder.cs https://github.com/dotnet/runtime/blob/main/src/libraries/Sy...
https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/SearchValues/ProbabilisticMap.cs https://github.com/dotnet/runtime/blob/main/src/libraries/Sy...
https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/SpanHelpers.Byte.cs#L759-L961 https://github.com/dotnet/runtime/blob/main/src/libraries/Sy...
https://github.com/dotnet/runtime/blob/main/src/libraries/Common/src/System/HexConverter.cs#L241-L333 https://github.com/dotnet/runtime/blob/main/src/libraries/Co...
https://godbolt.org/z/MfnWd19n8 https://godbolt.org/z/MfnWd19n8 (sometimes you get AVX2 cores on Godbolt, sometimes AVX512 so I'm forcing it via NativeAOT for a better example)
Having the runtime pick the optimal instruction set for all the paths above requires exactly zero steps from the user, much like with using DynamicPGO (which is why forms of static PGO are not comparable for the common case).
> autovec
Most performance critical paths which are not explicitly vectorized in C++ or Rust are either very fragile and not autovectorized at all. If you care about performance, it is way better to have good SIMD abstractions. Which is what .NET heavily invests into over (very expensive) loop autovectorization phase. Although at this point it does almost everything else, but there are way more impactful areas of investment. If you care about SIMD - use Vector128/256/512 and/or platform intrinsics instead for much better results.
Although I can't shake off the impression that you are looking for gotchas here and details aren't of particular interest.
- mhh__ 2y agoWith those flags I still can't seem to get it to do anything particularly interesting to a fixed length memset (e.g. at small N I would expect to see SSE instructions at least)
- neonsunset 2y agoIt looks like you haven't read my messages nor looked at the links.
- mhh__ 2y agoAnd I'm inclined to agree re autovec (fragile or not the code usually isn't that good) but that's to me at least why the JIT aspect isn't particularly attractive i.e. you'd have to do the work anyway, no?