I understand Span<T>
can be used on the .NET Framework as a Nuget package. There have been JIT upgrades to .NET Core to improve performance of Span<T>
to nearly standard array performance.
What .NET Framework versions support these runtime enhancements to the performance of Span<T>
?
They haven't until .NET 4.7.1 . Taken from here:
Note: The changes described here landed after the release fork for .NET Core 2.0 was created, so they are available in daily preview builds but not the released 2.0 bits. Similarly, these changes landed after the fork for .NET Framework 4.7.1 was created. The changes to struct argument passing and block layout, which are purely JIT changes, will automatically propagate to subsequent .NET Framework releases with the new JIT bits (the RyuJIT sources are shared between .NET Core and .NET Framework); the other changes depend on their runtime components to propagate to .NET Framework.
and then
Improvements for Span
Some of our work was motivated by the introduction of Span, so that it and similar types could better deliver on their performance promises.
One such change was #10910, which made the JIT recognize the Item property getters of Span and ReadOnlySpan as intrinsics