Skip to content

Add vectorized paths for Span<T>.Reverse - #64412

Merged
adamsitnik merged 14 commits into
dotnet:mainfrom
amd:vectorize-span-reverse
Apr 26, 2022
Merged

Add vectorized paths for Span<T>.Reverse#64412
adamsitnik merged 14 commits into
dotnet:mainfrom
amd:vectorize-span-reverse

Conversation

@alexcovington

Copy link
Copy Markdown
Contributor

Adds vectorized paths to Span<T>.Reverse for types that are supported. Falls back to previous behavior if T is not a value type or too big for a vector.

Compared against 65a5d0e.

Using this microbenchmark to compare performance, modified to use more buffer sizes and types:

Microbenchmark changes
diff --git a/src/benchmarks/micro/libraries/System.Memory/Span.cs b/src/benchmarks/micro/libraries/System.Memory/Span.cs
index e696e141..75d28d7d 100644
--- a/src/benchmarks/micro/libraries/System.Memory/Span.cs
+++ b/src/benchmarks/micro/libraries/System.Memory/Span.cs
@@ -14,11 +14,20 @@ namespace System.Memory
[GenericTypeArguments(typeof(byte))]
[GenericTypeArguments(typeof(char))]
[GenericTypeArguments(typeof(int))]
+ [GenericTypeArguments(typeof(long))]
+ [GenericTypeArguments(typeof(float))]
+ [GenericTypeArguments(typeof(double))]
[BenchmarkCategory(Categories.Runtime, Categories.Libraries, Categories.Span)]
public class Span<T>
where T : struct, IComparable<T>, IEquatable<T>
{
- [Params(Utils.DefaultCollectionSize)]
+ [Params(
+ 8 /* No vectorization */,
+ 34 /* SSSE3 with leftover */,
+ 68 /* AVX2 path with leftover bytes */,
+ Utils.DefaultCollectionSize,
+ Utils.DefaultCollectionSize * 2
+ )]
public int Size;
private T[] _array, _same, _emptyWithSingleValue;

Performance results:

$ py .\scripts\benchmarks_ci.py -c Release -f net7.0 --filter *Span*Reverse* --corerun C:\Users\acovingt\source\repos\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe --bdn-artifacts C:\Users\acovingt\Documents\vectorize-span-reverse-base
$ py .\scripts\benchmarks_ci.py -c Release -f net7.0 --filter *Span*Reverse* --corerun C:\Users\acovingt\source\repos\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe --bdn-artifacts C:\Users\acovingt\Documents\vectorize-span-reverse-diff
$ cd .\src\tools\ResultsComparer\ $ dotnet run -- --base C:\Users\acovingt\Documents\vectorize-span-reverse-base\ --diff C:\Users\acovingt\Documents\vectorize-span-reverse-diff\ --threshold 3% --noise 5ns
summary:
better: 23, geomean: 3.946
total diff: 23
No Slower results for the provided threshold = 3% and noise filter = 5ns.
| Faster | base/diff | Base Median (ns) | Diff Median (ns) | Modality|
| ---------------------------------------------- | ---------:| ----------------:| ----------------:| -------- |
| System.Memory.Span<Byte>.Reverse(Size: 1024) | 33.45 | 616.32 | 18.42 | |
| System.Memory.Span<Byte>.Reverse(Size: 512) | 28.16 | 306.00 | 10.87 | |
| System.Memory.Span<Char>.Reverse(Size: 512) | 16.26 | 300.26 | 18.47 | |
| System.Memory.Span<Char>.Reverse(Size: 1024) | 14.25 | 609.56 | 42.77 | |
| System.Memory.Span<Byte>.Reverse(Size: 68) | 5.75 | 33.59 | 5.84 | |
| System.Memory.Span<Char>.Reverse(Size: 68) | 5.54 | 39.56 | 7.14 | bimodal |
| System.Memory.Span<Single>.Reverse(Size: 512) | 4.57 | 152.19 | 33.33 | |
| System.Memory.Span<Char>.Reverse(Size: 34) | 4.13 | 21.56 | 5.22 | bimodal |
| System.Memory.Span<Single>.Reverse(Size: 1024) | 3.93 | 303.01 | 77.20 | |
| System.Memory.Span<Int32>.Reverse(Size: 1024) | 3.88 | 307.61 | 79.20 | |
| System.Memory.Span<Int32>.Reverse(Size: 512) | 3.67 | 154.75 | 42.20 | |
| System.Memory.Span<Byte>.Reverse(Size: 34) | 3.03 | 15.56 | 5.14 | several?|
| System.Memory.Span<Int32>.Reverse(Size: 68) | 2.59 | 23.28 | 8.98 | |
| System.Memory.Span<Single>.Reverse(Size: 68) | 2.45 | 19.77 | 8.06 | |
| System.Memory.Span<Single>.Reverse(Size: 34) | 2.21 | 12.41 | 5.62 | several?|
| System.Memory.Span<Int64>.Reverse(Size: 1024) | 2.01 | 302.07 | 150.24 | |
| System.Memory.Span<Int32>.Reverse(Size: 34) | 1.99 | 15.11 | 7.61 | |
| System.Memory.Span<Int64>.Reverse(Size: 512) | 1.98 | 153.95 | 77.64 | |
| System.Memory.Span<Double>.Reverse(Size: 512) | 1.97 | 152.21 | 77.18 | |
| System.Memory.Span<Double>.Reverse(Size: 1024) | 1.93 | 301.68 | 156.33 | |
| System.Memory.Span<Int64>.Reverse(Size: 68) | 1.91 | 23.54 | 12.35 | |
| System.Memory.Span<Int64>.Reverse(Size: 34) | 1.76 | 14.90 | 8.49 | |
| System.Memory.Span<Double>.Reverse(Size: 68) | 1.64 | 19.80 | 12.08 | |

Please let me know if I can provide any other information. Thanks!

@ghostghost added community-contribution Indicates that the PR has been added by a community member area-System.Memory labels Jan 27, 2022
@ghost

Copy link
Copy Markdown

Tagging subscribers to this area: @dotnet/area-system-memory
See info in area-owners.md if you want to be subscribed.

Issue Details

Adds vectorized paths to Span<T>.Reverse for types that are supported. Falls back to previous behavior if T is not a value type or too big for a vector.

Compared against 65a5d0e.

Using this microbenchmark to compare performance, modified to use more buffer sizes and types:

Microbenchmark changes
diff --git a/src/benchmarks/micro/libraries/System.Memory/Span.cs b/src/benchmarks/micro/libraries/System.Memory/Span.cs
index e696e141..75d28d7d 100644
--- a/src/benchmarks/micro/libraries/System.Memory/Span.cs
+++ b/src/benchmarks/micro/libraries/System.Memory/Span.cs
@@ -14,11 +14,20 @@ namespace System.Memory
[GenericTypeArguments(typeof(byte))]
[GenericTypeArguments(typeof(char))]
[GenericTypeArguments(typeof(int))]
+ [GenericTypeArguments(typeof(long))]
+ [GenericTypeArguments(typeof(float))]
+ [GenericTypeArguments(typeof(double))]
[BenchmarkCategory(Categories.Runtime, Categories.Libraries, Categories.Span)]
public class Span<T>
where T : struct, IComparable<T>, IEquatable<T>
{
- [Params(Utils.DefaultCollectionSize)]
+ [Params(
+ 8 /* No vectorization */,
+ 34 /* SSSE3 with leftover */,
+ 68 /* AVX2 path with leftover bytes */,
+ Utils.DefaultCollectionSize,
+ Utils.DefaultCollectionSize * 2
+ )]
public int Size;
private T[] _array, _same, _emptyWithSingleValue;

Performance results:

$ py .\scripts\benchmarks_ci.py -c Release -f net7.0 --filter *Span*Reverse* --corerun C:\Users\acovingt\source\repos\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe --bdn-artifacts C:\Users\acovingt\Documents\vectorize-span-reverse-base
$ py .\scripts\benchmarks_ci.py -c Release -f net7.0 --filter *Span*Reverse* --corerun C:\Users\acovingt\source\repos\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe --bdn-artifacts C:\Users\acovingt\Documents\vectorize-span-reverse-diff
$ cd .\src\tools\ResultsComparer\ $ dotnet run -- --base C:\Users\acovingt\Documents\vectorize-span-reverse-base\ --diff C:\Users\acovingt\Documents\vectorize-span-reverse-diff\ --threshold 3% --noise 5ns
summary:
better: 23, geomean: 3.946
total diff: 23
No Slower results for the provided threshold = 3% and noise filter = 5ns.
| Faster | base/diff | Base Median (ns) | Diff Median (ns) | Modality|
| ---------------------------------------------- | ---------:| ----------------:| ----------------:| -------- |
| System.Memory.Span<Byte>.Reverse(Size: 1024) | 33.45 | 616.32 | 18.42 | |
| System.Memory.Span<Byte>.Reverse(Size: 512) | 28.16 | 306.00 | 10.87 | |
| System.Memory.Span<Char>.Reverse(Size: 512) | 16.26 | 300.26 | 18.47 | |
| System.Memory.Span<Char>.Reverse(Size: 1024) | 14.25 | 609.56 | 42.77 | |
| System.Memory.Span<Byte>.Reverse(Size: 68) | 5.75 | 33.59 | 5.84 | |
| System.Memory.Span<Char>.Reverse(Size: 68) | 5.54 | 39.56 | 7.14 | bimodal |
| System.Memory.Span<Single>.Reverse(Size: 512) | 4.57 | 152.19 | 33.33 | |
| System.Memory.Span<Char>.Reverse(Size: 34) | 4.13 | 21.56 | 5.22 | bimodal |
| System.Memory.Span<Single>.Reverse(Size: 1024) | 3.93 | 303.01 | 77.20 | |
| System.Memory.Span<Int32>.Reverse(Size: 1024) | 3.88 | 307.61 | 79.20 | |
| System.Memory.Span<Int32>.Reverse(Size: 512) | 3.67 | 154.75 | 42.20 | |
| System.Memory.Span<Byte>.Reverse(Size: 34) | 3.03 | 15.56 | 5.14 | several?|
| System.Memory.Span<Int32>.Reverse(Size: 68) | 2.59 | 23.28 | 8.98 | |
| System.Memory.Span<Single>.Reverse(Size: 68) | 2.45 | 19.77 | 8.06 | |
| System.Memory.Span<Single>.Reverse(Size: 34) | 2.21 | 12.41 | 5.62 | several?|
| System.Memory.Span<Int64>.Reverse(Size: 1024) | 2.01 | 302.07 | 150.24 | |
| System.Memory.Span<Int32>.Reverse(Size: 34) | 1.99 | 15.11 | 7.61 | |
| System.Memory.Span<Int64>.Reverse(Size: 512) | 1.98 | 153.95 | 77.64 | |
| System.Memory.Span<Double>.Reverse(Size: 512) | 1.97 | 152.21 | 77.18 | |
| System.Memory.Span<Double>.Reverse(Size: 1024) | 1.93 | 301.68 | 156.33 | |
| System.Memory.Span<Int64>.Reverse(Size: 68) | 1.91 | 23.54 | 12.35 | |
| System.Memory.Span<Int64>.Reverse(Size: 34) | 1.76 | 14.90 | 8.49 | |
| System.Memory.Span<Double>.Reverse(Size: 68) | 1.64 | 19.80 | 12.08 | |

Please let me know if I can provide any other information. Thanks!

Author:alexcovington
Assignees:-
Labels:

area-System.Memory, community-contribution

Milestone:-

Comment threadsrc/libraries/System.Private.CoreLib/src/System/SpanHelpers.Byte.cs Outdated
Comment threadsrc/libraries/System.Private.CoreLib/src/System/SpanHelpers.Byte.cs Outdated
Comment threadsrc/libraries/System.Private.CoreLib/src/System/SpanHelpers.Byte.cs Outdated
Comment threadsrc/libraries/System.Private.CoreLib/src/System/MemoryExtensions.cs Outdated
@stephentoub

Copy link
Copy Markdown
Member

Thanks for sharing the perf tests. The results only show down to a size of 32 elements, and all of them show improvements. Is there a smaller size at which this is actually a regression?

@stephentoub

Copy link
Copy Markdown
Member

Array.Reverse<T> has its own almost identical implementation that won't benefit from these improvements. Can we change Array to delegate to the same underlying implementation being added here so that both arrays and spans benefit equally?

publicstaticvoidReverse<T>(T[]array)
{
if(array==null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
Reverse(array,0,array.Length);
}
publicstaticvoidReverse<T>(T[]array,intindex,intlength)
{
if(array==null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
if(index<0)
ThrowHelper.ThrowIndexArgumentOutOfRange_NeedNonNegNumException();
if(length<0)
ThrowHelper.ThrowLengthArgumentOutOfRange_ArgumentOutOfRange_NeedNonNegNum();
if(array.Length-index<length)
ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidOffLen);
if(length<=1)
return;
refTfirst=refUnsafe.Add(refMemoryMarshal.GetArrayDataReference(array),index);
refTlast=refUnsafe.Add(refUnsafe.Add(reffirst,length),-1);
do
{
Ttemp=first;
first=last;
last=temp;
first=refUnsafe.Add(reffirst,1);
last=refUnsafe.Add(reflast,-1);
}while(Unsafe.IsAddressLessThan(reffirst,reflast));
}

Comment threadsrc/libraries/System.Private.CoreLib/src/System/MemoryExtensions.cs Outdated
@alexcovington

Copy link
Copy Markdown
ContributorAuthor

Thanks for sharing the perf tests. The results only show down to a size of 32 elements, and all of them show improvements. Is there a smaller size at which this is actually a regression?

@stephentoub I didn't notice that the table didn't include the results for 8 byte spans. I changed my filter to be a little more inclusive when comparing results:

PS C:\Users\acovingt\source\repos\performance\src\tools\ResultsComparer> dotnet run -- --base C:\Users\acovingt\Documents\vectorize-span-reverse-base\ --diff C:\Users\acovingt\Documents\vectorize-span-reverse-diff\ --threshold 1% --noise 1ns
summary:
better: 24, geomean: 3.806
worse: 4, geomean: 1.463
total diff: 28
| Slower | diff/base | Base Median (ns) | Diff Median (ns) | Modality|
| ------------------------------------------- | ---------:| ----------------:| ----------------:| --------:|
| System.Memory.Span<Double>.Reverse(Size: 8) | 1.69 | 4.20 | 7.08 | |
| System.Memory.Span<Single>.Reverse(Size: 8) | 1.55 | 4.21 | 6.53 | |
| System.Memory.Span<Int32>.Reverse(Size: 8) | 1.34 | 5.02 | 6.74 | |
| System.Memory.Span<Byte>.Reverse(Size: 8) | 1.30 | 5.24 | 6.82 | |
| Faster | base/diff | Base Median (ns) | Diff Median (ns) | Modality|
| ---------------------------------------------- | ---------:| ----------------:| ----------------:| -------- |
| System.Memory.Span<Byte>.Reverse(Size: 1024) | 33.45 | 616.32 | 18.42 | |
| System.Memory.Span<Byte>.Reverse(Size: 512) | 28.16 | 306.00 | 10.87 | |
| System.Memory.Span<Char>.Reverse(Size: 512) | 16.26 | 300.26 | 18.47 | |
| System.Memory.Span<Char>.Reverse(Size: 1024) | 14.25 | 609.56 | 42.77 | |
| System.Memory.Span<Byte>.Reverse(Size: 68) | 5.75 | 33.59 | 5.84 | |
| System.Memory.Span<Char>.Reverse(Size: 68) | 5.54 | 39.56 | 7.14 | bimodal |
| System.Memory.Span<Single>.Reverse(Size: 512) | 4.57 | 152.19 | 33.33 | |
| System.Memory.Span<Char>.Reverse(Size: 34) | 4.13 | 21.56 | 5.22 | bimodal |
| System.Memory.Span<Single>.Reverse(Size: 1024) | 3.93 | 303.01 | 77.20 | |
| System.Memory.Span<Int32>.Reverse(Size: 1024) | 3.88 | 307.61 | 79.20 | |
| System.Memory.Span<Int32>.Reverse(Size: 512) | 3.67 | 154.75 | 42.20 | |
| System.Memory.Span<Byte>.Reverse(Size: 34) | 3.03 | 15.56 | 5.14 | several?|
| System.Memory.Span<Int32>.Reverse(Size: 68) | 2.59 | 23.28 | 8.98 | |
| System.Memory.Span<Single>.Reverse(Size: 68) | 2.45 | 19.77 | 8.06 | |
| System.Memory.Span<Single>.Reverse(Size: 34) | 2.21 | 12.41 | 5.62 | several?|
| System.Memory.Span<Int64>.Reverse(Size: 1024) | 2.01 | 302.07 | 150.24 | |
| System.Memory.Span<Int32>.Reverse(Size: 34) | 1.99 | 15.11 | 7.61 | |
| System.Memory.Span<Int64>.Reverse(Size: 512) | 1.98 | 153.95 | 77.64 | |
| System.Memory.Span<Double>.Reverse(Size: 512) | 1.97 | 152.21 | 77.18 | |
| System.Memory.Span<Double>.Reverse(Size: 1024) | 1.93 | 301.68 | 156.33 | |
| System.Memory.Span<Int64>.Reverse(Size: 68) | 1.91 | 23.54 | 12.35 | |
| System.Memory.Span<Int64>.Reverse(Size: 34) | 1.76 | 14.90 | 8.49 | |
| System.Memory.Span<Double>.Reverse(Size: 34) | 1.66 | 12.35 | 7.44 | |
| System.Memory.Span<Double>.Reverse(Size: 68) | 1.64 | 19.80 | 12.08 | |

There's a 2-3ns regression for the really small spans possibly due to the overhead of the extra conditional checks, or it could just be noise.

Let me know if you'd like more analysis on it.

@alexcovington

Copy link
Copy Markdown
ContributorAuthor

Array.Reverse<T> has its own almost identical implementation that won't benefit from these improvements. Can we change Array to delegate to the same underlying implementation being added here so that both arrays and spans benefit equally?

publicstaticvoidReverse<T>(T[]array)
{
if(array==null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
Reverse(array,0,array.Length);
}
publicstaticvoidReverse<T>(T[]array,intindex,intlength)
{
if(array==null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
if(index<0)
ThrowHelper.ThrowIndexArgumentOutOfRange_NeedNonNegNumException();
if(length<0)
ThrowHelper.ThrowLengthArgumentOutOfRange_ArgumentOutOfRange_NeedNonNegNum();
if(array.Length-index<length)
ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidOffLen);
if(length<=1)
return;
refTfirst=refUnsafe.Add(refMemoryMarshal.GetArrayDataReference(array),index);
refTlast=refUnsafe.Add(refUnsafe.Add(reffirst,length),-1);
do
{
Ttemp=first;
first=last;
last=temp;
first=refUnsafe.Add(reffirst,1);
last=refUnsafe.Add(reflast,-1);
}while(Unsafe.IsAddressLessThan(reffirst,reflast));
}

I didn't notice this, but you're right that Array can also benefit from this. I'll try adding the paths there as well and send an update.

@alexcovington

Copy link
Copy Markdown
ContributorAuthor

@stephentoub Updated PR to include the optimizations for Array.Reverse as well.

To verify the performance, I did a quick copy of the same benchmark and had it reverse the original array instead.

Microbenchmark changes
@@ -14,11 +14,20 @@ namespace System.Memory
[GenericTypeArguments(typeof(byte))]
[GenericTypeArguments(typeof(char))]
[GenericTypeArguments(typeof(int))]
+ [GenericTypeArguments(typeof(long))]+ [GenericTypeArguments(typeof(float))]+ [GenericTypeArguments(typeof(double))]
[BenchmarkCategory(Categories.Runtime, Categories.Libraries, Categories.Span)]
public class Span<T>
where T : struct, IComparable<T>, IEquatable<T>
{
- [Params(Utils.DefaultCollectionSize)]+ [Params(+ 8 /* No vectorization */,+ 34 /* SSSE3 with leftover */,+ 68 /* AVX2 path with leftover bytes */,+ Utils.DefaultCollectionSize,+ Utils.DefaultCollectionSize * 2+ )]
public int Size;
private T[] _array, _same, _emptyWithSingleValue;
@@ -41,6 +50,9 @@ namespace System.Memory
[Benchmark]
public void Reverse() => new System.Span<T>(_array).Reverse();
+ [Benchmark]+ public void ReverseArray() => _array.Reverse();+
[Benchmark]
public T[] ToArray() => new System.Span<T>(_array).ToArray();
Performance results
BenchmarkDotNet=v0.13.1.1669-nightly, OS=Windows 10 (10.0.19044.1415/21H2/November2021Update)
AMD Ryzen 5 3600, 1 CPU, 12 logical and 6 physical cores
.NET SDK=7.0.100-preview.2.22078.1
[Host] : .NET 7.0.0 (7.0.22.7408), X64 RyuJIT
Job-FHRFIJ : .NET 7.0.0 (42.42.42.42424), X64 RyuJIT
Job-KGLSXA : .NET 7.0.0 (42.42.42.42424), X64 RyuJIT
PowerPlanMode=00000000-0000-0000-0000-000000000000 Arguments=/p:DebugType=portable,-bl:benchmarkdotnet.binlog IterationTime=250.0000 ms MaxIterationCount=20 MinIterationCount=15 WarmupCount=1 
TypeMethodJobToolchainSizeMeanErrorStdDevMedianMinMaxRatioRatioSDGen 0AllocatedAlloc Ratio
Span<Byte>ReverseJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe85.520 ns0.3235 ns0.3595 ns5.408 ns5.130 ns6.543 ns1.000.00--NA
Span<Byte>ReverseJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe85.266 ns0.1361 ns0.1456 ns5.237 ns5.047 ns5.545 ns0.960.07--NA
Span<Char>ReverseJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe85.577 ns0.2455 ns0.2827 ns5.525 ns5.261 ns6.255 ns1.000.00--NA
Span<Char>ReverseJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe85.160 ns0.1787 ns0.1987 ns5.107 ns4.780 ns5.524 ns0.930.06--NA
Span<Double>ReverseJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe85.019 ns0.2419 ns0.2689 ns5.010 ns4.598 ns5.424 ns1.000.00--NA
Span<Double>ReverseJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe83.372 ns0.0810 ns0.0676 ns3.369 ns3.237 ns3.494 ns0.670.03--NA
Span<Int32>ReverseJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe85.367 ns0.3346 ns0.3853 ns5.219 ns4.900 ns6.279 ns1.000.00--NA
Span<Int32>ReverseJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe84.585 ns0.1160 ns0.1028 ns4.581 ns4.423 ns4.781 ns0.840.07--NA
Span<Int64>ReverseJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe85.366 ns0.1760 ns0.1956 ns5.313 ns5.069 ns5.743 ns1.000.00--NA
Span<Int64>ReverseJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe83.281 ns0.0995 ns0.1065 ns3.258 ns3.104 ns3.492 ns0.610.03--NA
Span<Single>ReverseJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe85.096 ns0.3850 ns0.4279 ns4.928 ns4.449 ns6.003 ns1.000.00--NA
Span<Single>ReverseJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe85.450 ns0.2560 ns0.2846 ns5.336 ns4.920 ns6.008 ns1.080.12--NA
Span<Byte>ReverseArrayJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe87.587 ns0.2562 ns0.2847 ns7.534 ns7.171 ns8.182 ns1.000.000.005748 B1.00
Span<Byte>ReverseArrayJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe88.353 ns0.2116 ns0.2352 ns8.403 ns7.905 ns8.828 ns1.100.040.005748 B1.00
Span<Char>ReverseArrayJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe87.876 ns0.2675 ns0.2863 ns7.863 ns7.416 ns8.510 ns1.000.000.005748 B1.00
Span<Char>ReverseArrayJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe88.004 ns0.4029 ns0.4478 ns7.962 ns7.293 ns8.817 ns1.020.060.005748 B1.00
Span<Double>ReverseArrayJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe88.090 ns0.3468 ns0.3711 ns8.000 ns7.534 ns8.745 ns1.000.000.005748 B1.00
Span<Double>ReverseArrayJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe87.939 ns0.3305 ns0.3806 ns7.929 ns7.438 ns8.833 ns0.990.080.005748 B1.00
Span<Int32>ReverseArrayJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe88.231 ns0.4143 ns0.4771 ns8.007 ns7.617 ns9.212 ns1.000.000.005748 B1.00
Span<Int32>ReverseArrayJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe88.063 ns0.3655 ns0.4210 ns8.143 ns7.353 ns9.113 ns0.980.080.005748 B1.00
Span<Int64>ReverseArrayJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe89.724 ns0.5913 ns0.6809 ns9.604 ns8.832 ns11.157 ns1.000.000.005748 B1.00
Span<Int64>ReverseArrayJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe87.725 ns0.3031 ns0.3369 ns7.730 ns7.026 ns8.475 ns0.800.060.005748 B1.00
Span<Single>ReverseArrayJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe87.824 ns0.2631 ns0.2702 ns7.771 ns7.417 ns8.564 ns1.000.000.005748 B1.00
Span<Single>ReverseArrayJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe87.809 ns0.3318 ns0.3821 ns7.761 ns7.206 ns8.428 ns1.010.050.005748 B1.00
Span<Byte>ReverseJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe3419.987 ns1.4561 ns1.6768 ns20.243 ns16.980 ns22.752 ns1.000.00--NA
Span<Byte>ReverseJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe343.772 ns0.2250 ns0.2592 ns3.765 ns3.346 ns4.285 ns0.190.01--NA
Span<Char>ReverseJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe3418.797 ns0.3681 ns0.3443 ns18.846 ns18.237 ns19.413 ns1.000.00--NA
Span<Char>ReverseJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe344.134 ns0.2428 ns0.2597 ns4.101 ns3.823 ns4.735 ns0.220.02--NA
Span<Double>ReverseJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe3414.286 ns0.3942 ns0.4540 ns14.150 ns13.689 ns15.292 ns1.000.00--NA
Span<Double>ReverseJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe347.089 ns0.3223 ns0.3582 ns7.022 ns6.581 ns7.855 ns0.500.03--NA
Span<Int32>ReverseJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe3415.881 ns0.4342 ns0.5000 ns15.744 ns15.185 ns16.850 ns1.000.00--NA
Span<Int32>ReverseJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe344.948 ns0.2778 ns0.3199 ns4.954 ns4.458 ns5.643 ns0.310.02--NA
Span<Int64>ReverseJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe3415.256 ns0.3355 ns0.3729 ns15.151 ns14.861 ns16.243 ns1.000.00--NA
Span<Int64>ReverseJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe346.799 ns0.2343 ns0.2698 ns6.805 ns6.303 ns7.297 ns0.450.02--NA
Span<Single>ReverseJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe3414.213 ns0.4007 ns0.4453 ns14.075 ns13.660 ns15.193 ns1.000.00--NA
Span<Single>ReverseJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe344.810 ns0.2720 ns0.2910 ns4.724 ns4.462 ns5.345 ns0.340.02--NA
Span<Byte>ReverseArrayJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe348.077 ns0.6692 ns0.7706 ns8.044 ns7.043 ns9.612 ns1.000.000.005748 B1.00
Span<Byte>ReverseArrayJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe347.788 ns0.4962 ns0.5714 ns7.681 ns7.107 ns8.911 ns0.970.080.005748 B1.00
Span<Char>ReverseArrayJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe347.844 ns0.5070 ns0.5839 ns7.713 ns7.224 ns9.234 ns1.000.000.005748 B1.00
Span<Char>ReverseArrayJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe349.578 ns1.5863 ns1.8268 ns8.997 ns7.225 ns13.210 ns1.230.250.005748 B1.00
Span<Double>ReverseArrayJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe347.779 ns0.1663 ns0.1474 ns7.751 ns7.554 ns8.004 ns1.000.000.005748 B1.00
Span<Double>ReverseArrayJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe347.673 ns0.2380 ns0.2646 ns7.632 ns7.274 ns8.135 ns0.980.040.005748 B1.00
Span<Int32>ReverseArrayJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe347.794 ns0.2142 ns0.2381 ns7.749 ns7.446 ns8.395 ns1.000.000.005748 B1.00
Span<Int32>ReverseArrayJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe347.672 ns0.3186 ns0.3541 ns7.593 ns7.256 ns8.481 ns0.980.040.005748 B1.00
Span<Int64>ReverseArrayJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe349.618 ns0.3395 ns0.3909 ns9.571 ns9.099 ns10.511 ns1.000.000.005748 B1.00
Span<Int64>ReverseArrayJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe347.367 ns0.3446 ns0.3538 ns7.273 ns6.963 ns8.370 ns0.760.060.005748 B1.00
Span<Single>ReverseArrayJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe347.862 ns0.3622 ns0.4171 ns7.650 ns7.316 ns8.645 ns1.000.000.005748 B1.00
Span<Single>ReverseArrayJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe347.850 ns0.3969 ns0.4411 ns7.840 ns7.281 ns8.807 ns1.000.090.005748 B1.00
Span<Byte>ReverseJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe6834.032 ns1.1898 ns1.2731 ns33.821 ns32.554 ns36.661 ns1.000.00--NA
Span<Byte>ReverseJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe684.381 ns0.1225 ns0.1311 ns4.425 ns4.091 ns4.608 ns0.130.01--NA
Span<Char>ReverseJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe6834.295 ns0.7447 ns0.6966 ns34.213 ns33.174 ns35.414 ns1.000.00--NA
Span<Char>ReverseJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe685.452 ns0.2268 ns0.2611 ns5.440 ns5.078 ns5.893 ns0.160.01--NA
Span<Double>ReverseJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe6824.392 ns1.0467 ns1.0748 ns24.309 ns23.170 ns27.153 ns1.000.00--NA
Span<Double>ReverseJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe6815.108 ns0.2478 ns0.2069 ns15.092 ns14.856 ns15.580 ns0.620.03--NA
Span<Int32>ReverseJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe6824.522 ns0.7755 ns0.8930 ns24.090 ns23.431 ns26.373 ns1.000.00--NA
Span<Int32>ReverseJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe687.718 ns0.2908 ns0.3349 ns7.766 ns7.222 ns8.354 ns0.320.02--NA
Span<Int64>ReverseJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe6824.862 ns0.7633 ns0.8484 ns24.687 ns23.698 ns26.954 ns1.000.00--NA
Span<Int64>ReverseJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe6810.736 ns0.4633 ns0.5149 ns10.555 ns10.111 ns11.744 ns0.430.03--NA
Span<Single>ReverseJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe6824.264 ns1.1811 ns1.3602 ns23.699 ns22.872 ns26.753 ns1.000.00--NA
Span<Single>ReverseJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe688.674 ns0.2843 ns0.3160 ns8.662 ns8.160 ns9.195 ns0.360.02--NA
Span<Byte>ReverseArrayJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe687.554 ns0.2177 ns0.2507 ns7.497 ns7.024 ns8.018 ns1.000.000.005748 B1.00
Span<Byte>ReverseArrayJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe687.463 ns0.2131 ns0.2369 ns7.450 ns7.114 ns7.988 ns0.990.050.005748 B1.00
Span<Char>ReverseArrayJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe687.896 ns0.3654 ns0.3909 ns7.884 ns7.302 ns8.653 ns1.000.000.005748 B1.00
Span<Char>ReverseArrayJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe687.856 ns0.4322 ns0.4978 ns7.765 ns7.275 ns9.036 ns0.990.060.005748 B1.00
Span<Double>ReverseArrayJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe688.021 ns0.3683 ns0.4242 ns8.009 ns7.412 ns8.776 ns1.000.000.005748 B1.00
Span<Double>ReverseArrayJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe687.520 ns0.1368 ns0.1142 ns7.543 ns7.334 ns7.714 ns0.940.050.005748 B1.00
Span<Int32>ReverseArrayJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe687.878 ns0.4089 ns0.4709 ns7.818 ns7.351 ns8.969 ns1.000.000.005748 B1.00
Span<Int32>ReverseArrayJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe687.759 ns0.3057 ns0.3398 ns7.656 ns7.306 ns8.605 ns0.990.060.005748 B1.00
Span<Int64>ReverseArrayJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe689.062 ns0.2920 ns0.3362 ns9.197 ns8.153 ns9.445 ns1.000.000.005748 B1.00
Span<Int64>ReverseArrayJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe687.693 ns0.4299 ns0.4951 ns7.554 ns7.178 ns9.011 ns0.850.050.005748 B1.00
Span<Single>ReverseArrayJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe687.918 ns0.2114 ns0.2262 ns7.910 ns7.506 ns8.302 ns1.000.000.005748 B1.00
Span<Single>ReverseArrayJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe687.989 ns0.4591 ns0.5287 ns7.913 ns7.267 ns9.029 ns1.010.080.005748 B1.00
Span<Byte>ReverseJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe512308.148 ns1.9129 ns1.7894 ns307.750 ns305.312 ns311.041 ns1.000.00--NA
Span<Byte>ReverseJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe5129.791 ns0.5977 ns0.6883 ns9.736 ns8.779 ns11.055 ns0.030.00--NA
Span<Char>ReverseJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe512308.872 ns4.4762 ns4.1870 ns307.695 ns303.549 ns317.944 ns1.000.00--NA
Span<Char>ReverseJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe51224.216 ns0.4776 ns0.5110 ns24.171 ns23.394 ns25.113 ns0.080.00--NA
Span<Double>ReverseJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe512167.078 ns6.1122 ns6.7936 ns167.062 ns155.270 ns177.899 ns1.000.00--NA
Span<Double>ReverseJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe51279.162 ns1.4420 ns1.2783 ns79.150 ns76.854 ns81.755 ns0.470.02--NA
Span<Int32>ReverseJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe512159.908 ns3.2113 ns3.2978 ns159.484 ns154.711 ns165.094 ns1.000.00--NA
Span<Int32>ReverseJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe51242.780 ns1.8013 ns2.0744 ns42.565 ns37.955 ns46.418 ns0.270.02--NA
Span<Int64>ReverseJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe512159.236 ns3.6277 ns3.8816 ns159.271 ns152.683 ns166.493 ns1.000.00--NA
Span<Int64>ReverseJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe51274.144 ns2.0413 ns2.3508 ns73.866 ns70.691 ns78.616 ns0.460.02--NA
Span<Single>ReverseJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe512166.105 ns6.8180 ns7.8516 ns163.366 ns157.062 ns182.688 ns1.000.00--NA
Span<Single>ReverseJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe51241.930 ns1.2742 ns1.4674 ns41.705 ns39.787 ns44.695 ns0.250.01--NA
Span<Byte>ReverseArrayJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe5127.418 ns0.2660 ns0.2846 ns7.373 ns6.995 ns8.044 ns1.000.000.005748 B1.00
Span<Byte>ReverseArrayJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe5127.452 ns0.3129 ns0.3477 ns7.431 ns7.026 ns8.084 ns1.000.070.005748 B1.00
Span<Char>ReverseArrayJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe5127.895 ns0.2964 ns0.3294 ns7.934 ns7.330 ns8.437 ns1.000.000.005748 B1.00
Span<Char>ReverseArrayJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe5127.862 ns0.2800 ns0.3224 ns7.770 ns7.219 ns8.578 ns1.000.070.005748 B1.00
Span<Double>ReverseArrayJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe5128.273 ns0.3909 ns0.4501 ns8.225 ns7.613 ns9.046 ns1.000.000.005748 B1.00
Span<Double>ReverseArrayJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe5128.043 ns0.3316 ns0.3686 ns7.953 ns7.540 ns8.741 ns0.980.070.005748 B1.00
Span<Int32>ReverseArrayJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe5127.767 ns0.2597 ns0.2887 ns7.772 ns7.318 ns8.222 ns1.000.000.005748 B1.00
Span<Int32>ReverseArrayJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe5127.767 ns0.2868 ns0.3069 ns7.805 ns7.165 ns8.346 ns1.000.070.005748 B1.00
Span<Int64>ReverseArrayJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe5129.678 ns0.5640 ns0.6269 ns9.615 ns8.812 ns11.005 ns1.000.000.005748 B1.00
Span<Int64>ReverseArrayJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe5127.483 ns0.3955 ns0.4396 ns7.413 ns6.938 ns8.390 ns0.780.070.005748 B1.00
Span<Single>ReverseArrayJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe5128.161 ns0.3820 ns0.4087 ns8.140 ns7.579 ns8.966 ns1.000.000.005748 B1.00
Span<Single>ReverseArrayJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe5127.750 ns0.2831 ns0.3147 ns7.681 ns7.376 ns8.542 ns0.950.060.005748 B1.00
Span<Byte>ReverseJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe1024633.223 ns8.3046 ns7.7682 ns632.430 ns620.162 ns647.521 ns1.000.00--NA
Span<Byte>ReverseJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe102421.942 ns2.2872 ns2.6340 ns23.206 ns17.887 ns26.030 ns0.030.00--NA
Span<Char>ReverseJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe1024616.793 ns10.7145 ns10.0224 ns615.495 ns603.050 ns639.831 ns1.000.00--NA
Span<Char>ReverseJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe102441.262 ns1.0656 ns1.1845 ns41.207 ns39.861 ns44.710 ns0.070.00--NA
Span<Double>ReverseJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe1024322.755 ns13.7626 ns15.8490 ns316.026 ns300.807 ns353.163 ns1.000.00--NA
Span<Double>ReverseJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe1024160.278 ns3.6299 ns4.1802 ns160.077 ns155.045 ns170.722 ns0.500.03--NA
Span<Int32>ReverseJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe1024319.603 ns8.6402 ns9.9500 ns321.806 ns302.775 ns333.367 ns1.000.00--NA
Span<Int32>ReverseJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe102475.303 ns1.8537 ns2.1347 ns75.466 ns71.836 ns79.226 ns0.240.01--NA
Span<Int64>ReverseJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe1024312.095 ns7.5790 ns8.7280 ns308.705 ns302.279 ns331.895 ns1.000.00--NA
Span<Int64>ReverseJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe1024162.231 ns3.8566 ns4.2866 ns162.476 ns155.171 ns170.240 ns0.520.02--NA
Span<Single>ReverseJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe1024320.737 ns10.5037 ns11.6748 ns321.167 ns302.824 ns345.795 ns1.000.00--NA
Span<Single>ReverseJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe102479.105 ns1.5449 ns1.4451 ns79.080 ns76.844 ns81.631 ns0.250.01--NA
Span<Byte>ReverseArrayJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe10247.848 ns0.6288 ns0.7241 ns7.610 ns6.913 ns9.330 ns1.000.000.005748 B1.00
Span<Byte>ReverseArrayJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe10247.390 ns0.2733 ns0.3148 ns7.373 ns6.872 ns8.104 ns0.950.090.005748 B1.00
Span<Char>ReverseArrayJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe10248.250 ns0.4993 ns0.5750 ns8.298 ns7.401 ns9.308 ns1.000.000.005748 B1.00
Span<Char>ReverseArrayJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe10247.871 ns0.2963 ns0.3412 ns7.870 ns7.388 ns8.526 ns0.960.070.005748 B1.00
Span<Double>ReverseArrayJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe10247.799 ns0.3453 ns0.3837 ns7.745 ns7.263 ns8.400 ns1.000.000.005748 B1.00
Span<Double>ReverseArrayJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe10247.917 ns0.4342 ns0.5000 ns7.966 ns7.250 ns8.866 ns1.020.090.005748 B1.00
Span<Int32>ReverseArrayJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe10248.124 ns0.6008 ns0.6919 ns8.000 ns7.292 ns9.662 ns1.000.000.005748 B1.00
Span<Int32>ReverseArrayJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe10247.962 ns0.4545 ns0.5052 ns7.826 ns7.385 ns9.180 ns0.980.080.005748 B1.00
Span<Int64>ReverseArrayJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe10249.337 ns0.3945 ns0.4385 ns9.382 ns8.083 ns10.056 ns1.000.000.005748 B1.00
Span<Int64>ReverseArrayJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe10247.301 ns0.2937 ns0.3382 ns7.216 ns6.798 ns8.042 ns0.780.060.005748 B1.00
Span<Single>ReverseArrayJob-FHRFIJ\runtime-master\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe102410.709 ns0.6433 ns0.7150 ns10.478 ns9.719 ns12.393 ns1.000.000.005748 B1.00
Span<Single>ReverseArrayJob-KGLSXA\runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\corerun.exe10247.895 ns0.4347 ns0.4831 ns7.682 ns7.318 ns8.894 ns0.740.050.005748 B1.00

Please let me know if there is anything else I can look at.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to duplicate all of the above? How about instead having a single method in SpanHelpers:

publicstaticvoidReverse<T>(refTelements,nuintlength);

or something similar. That method can do all the of the delegation to the other helpers (ReverseByRef, ReverseInner, etc.), and then this method can be:

[MethodImpl(MethodImplOptions.AggressiveInlining)]publicstaticvoidReverse<T>(T[]array,intindex,intlength){
...// argument validationSpanHelpers.Reverse(refUnsafe.Add(refMemoryMarshal.GetArrayDataReference(array),index),length);}

and Span.Reverse can be:

[MethodImpl(MethodImplOptions.AggressiveInlining)]publicstaticvoidReverse<T>(thisSpan<T>span)=>SpanHelpers.Reverse(refMemoryMarshal.GetReference(span),span.Length);

?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, yes I agree that would be a lot cleaner! I'll go ahead and make the changes and push an update.

Comment threadsrc/libraries/System.Private.CoreLib/src/System/Array.cs Outdated
Comment threadsrc/libraries/System.Private.CoreLib/src/System/Array.cs Outdated
Comment threadsrc/libraries/System.Private.CoreLib/src/System/Array.cs Outdated
Comment threadsrc/libraries/System.Private.CoreLib/src/System/Array.cs Outdated
Comment threadsrc/libraries/System.Private.CoreLib/src/System/MemoryExtensions.cs Outdated
Comment threadsrc/libraries/System.Private.CoreLib/src/System/SpanHelpers.cs Outdated
Comment threadsrc/libraries/System.Private.CoreLib/src/System/SpanHelpers.Byte.cs Outdated
Comment threadsrc/libraries/System.Private.CoreLib/src/System/SpanHelpers.Byte.cs Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments describing what this dense block of code is doing would be helpful.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added comments to hopefully clear up what the operation is. Please let me know if I can clarify anything.

@stephentoubstephentoub left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this. Other than my remaining comments, this LGTM, but @tannergooding should sign-off as well.

@deeprobindeeprobin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not be alarmed. I just noted a few coding style things.

For the things where I changed the naming from CamelCase to lowerCamelCase please check again that the usage is also adjusted and not that you just take over the diff 1:1.

Otherwise it looks good to me in the first place.

Comment threadsrc/libraries/System.Private.CoreLib/src/System/SpanHelpers.Byte.cs Outdated
Comment threadsrc/libraries/System.Private.CoreLib/src/System/SpanHelpers.Byte.cs Outdated
Comment threadsrc/libraries/System.Private.CoreLib/src/System/SpanHelpers.Char.cs Outdated
Comment threadsrc/libraries/System.Private.CoreLib/src/System/SpanHelpers.cs Outdated
Comment threadsrc/libraries/System.Private.CoreLib/src/System/SpanHelpers.cs Outdated
Comment threadsrc/libraries/System.Private.CoreLib/src/System/SpanHelpers.Byte.cs Outdated
Comment threadsrc/libraries/System.Private.CoreLib/src/System/SpanHelpers.Byte.cs Outdated
Comment threadsrc/libraries/System.Private.CoreLib/src/System/SpanHelpers.Byte.cs Outdated
Comment threadsrc/libraries/System.Private.CoreLib/src/System/SpanHelpers.Byte.cs Outdated
Comment threadsrc/libraries/System.Private.CoreLib/src/System/SpanHelpers.Char.cs Outdated
Comment threadsrc/libraries/System.Private.CoreLib/src/System/SpanHelpers.cs Outdated
@saucecontrol

Copy link
Copy Markdown
Member

Did you benchmark the AVX2 version against the SSSE3 version (run with DOTNET_EnableAVX2=0 to allow VEX encoding but force the SSSE3 fallback)? I would expect that with the additional permutes required for 256-bit vectors, the perf difference might not justify the extra code paths.

@alexcovington

Copy link
Copy Markdown
ContributorAuthor

Did you benchmark the AVX2 version against the SSSE3 version (run with DOTNET_EnableAVX2=0 to allow VEX encoding but force the SSSE3 fallback)? I would expect that with the additional permutes required for 256-bit vectors, the perf difference might not justify the extra code paths.

@saucecontrol Haven't tried yet, I'll give it a shot and update this thread with results once finished.

@MichalStrehovsky
MichalStrehovsky removed their request for review March 21, 2022 01:30
@alexcovington
alexcovingtonforce-pushed the vectorize-span-reverse branch from c663fa4 to 7ef62abCompareApril 25, 2022 15:59

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This trick is neat, but it generates worse IL:

https://sharplab.io/#v2:EYLgtghglgdgNAFxFANgHwAIBYAEAVAUwGcEBGAHjwD4AKAJwIDN8dGo6S4cHm8cUIJAJQBYAFABvcThksEBMAAccAXlbsSAbmmy2HBKv6CE2sbKMlD8paYC+48dnzEEAJkq0eLPZ25MWAsLiUmayNIEIXD4IQoY00VwRQnZAA==

Notice that there is one local temp for the existing code and two local temps with the tuples trick.

Is the JIT able to optimize out the extra local temp in all cases, even for larger structs? We do not seem to have a coverage for larger structs in dotnet/performance.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tuples trick was mostly just for styling, but if explicitly using the temp generates better IL then we should probably go with that. I've updated the PR.

@tannergoodingtannergoodingApr 25, 2022

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably a case where either Roslyn or the JIT could be updated.

Edit: I missed that the other JIT example above was for byref which is probably something only Roslyn can fix...


At a high level....

The (last, first) = (first, last) generates:

IL_0000: ldarg.1
IL_0001: ldarg.2
IL_0002: stloc.0
IL_0003: starg.s last
IL_0005: ldloc.0
IL_0006: starg.s first
IL_0008: ret

The var temp = last; last = first; first = temp; generates

IL_0000: ldarg.2
IL_0001: ldarg.1
IL_0002: starg.s last
IL_0004: starg.s first
IL_0006: ret

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't the JIT optimize this to the same code? All this code does is shuffle values around. There is no memory or computation involved.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I filed an issue in dotnet/roslyn: dotnet/roslyn#61127

@Neme12Neme12May 4, 2022

Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't the JIT optimize this to the same code? All this code does is shuffle values around. There is no memory or computation involved.

Likely because it can't "see" that the larger struct case is the same pattern as the smaller one. There's also the question of whether it's a worthwhile pattern to spend time trying to recognise.

@adamsitnik

Copy link
Copy Markdown
Member

@alexcovington I've merged #68493, could you please sync your branch?

alexcovingtonand others added 14 commits April 25, 2022 11:46
…re the same size as char, int, or long that use AVX2 or SSSE3 where possible
Co-authored-by: Theodore Tsirpanis <teo@tsirpanis.gr>
…cit inlining and moved generic fallbacks into their own private methods.
… reversing empty or single-element array, better shuffle for int and long Reverse using bit control mask instead of vector control mask
…te4x64 and PermuteVar8x32 for Int32 and Int64 respectively to reduce total operations.
@alexcovington
alexcovingtonforce-pushed the vectorize-span-reverse branch from 17702cd to 80ae8abCompareApril 25, 2022 18:52
@alexcovington

Copy link
Copy Markdown
ContributorAuthor

@adamsitnik I've synced the PR to include your updated tests, please let me know if there is anything else I can look at.

@adamsitnikadamsitnik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you @alexcovington !

@dakersnar

dakersnar commented Jun 8, 2022

Copy link
Copy Markdown
Contributor

The preview 5 perf report has detected a lot of improvement from this change on a variety of benchmarks, most notably:

System.Memory.Span<Byte>.Reverse(Size: 512), System.Memory.Span<Char>.Reverse(Size: 512), System.Memory.Span<Int32>.Reverse(Size: 512), System.Tests.Perf_Array.Reverse

I've included the raw data below in "details". Notably, while the x64 configs have speed up, we do see some slowdown on Arm64 configs. This is being tracked here: #68667

x64:
image

Arm64:
image

I also see some speedup in System.Memory.Span<Byte>.Fill(Size: 512), System.Memory.Span<Byte>.Clear(Size: 512). Do you know if these are related?

Details

System.Memory.Span.Reverse(Size: 512)

ResultRatioOperating SystemBitProcessor Name
Slower0.74debian 11Arm64Unknown processor
Slower0.80ubuntu 18.04Arm64Unknown processor
Slower0.71ubuntu 20.04Arm64Unknown processor
Slower0.74Windows 11Arm64Microsoft SQ1 3.0 GHz
Slower0.89macOS Monterey 12.3Arm64Apple M1 Max
Faster11.72Windows 10X64Intel Core i7-6700 CPU 3.40GHz (Skylake)
Faster10.60Windows 10X64Intel Core i7-8650U CPU 1.90GHz (Kaby Lake R)
Faster11.56Windows 10X64Intel Core i9-10900K CPU 3.70GHz
Faster31.21Windows 11X64AMD Ryzen 9 5900X
Faster31.78Windows 11X64AMD Ryzen 9 5950X
Faster11.16Windows 11X64Intel Core i7-8700 CPU 3.20GHz (Coffee Lake)
Faster12.09Windows 11X6411th Gen Intel Core i9-11900H 2.50GHz
Faster12.43Windows 11X64Intel Core i9-9900T CPU 2.10GHz
Faster9.05ubuntu 18.04X64Intel Xeon CPU E5530 2.40GHz
Faster7.64ubuntu 18.04X64Intel Core i7-2720QM CPU 2.20GHz (Sandy Bridge)
Faster12.95ubuntu 20.04X64Intel Core i7-8700 CPU 3.20GHz (Coffee Lake)
Faster9.42Windows 10X86Intel Core i7-6700 CPU 3.40GHz (Skylake)
Faster12.58macOS Big Sur 11.6.6X64Intel Core i5-4278U CPU 2.60GHz (Haswell)

System.Tests.Perf_Array.Reverse

ResultRatioOperating SystemBitProcessor Name
Slower0.60debian 11Arm64Unknown processor
Slower0.68ubuntu 18.04Arm64Unknown processor
Slower0.58ubuntu 20.04Arm64Unknown processor
Slower0.60Windows 11Arm64Microsoft SQ1 3.0 GHz
Slower0.75macOS Monterey 12.3Arm64Apple M1 Max
Faster4.76Windows 10X64Intel Core i7-6700 CPU 3.40GHz (Skylake)
Faster3.20Windows 10X64Intel Core i7-8650U CPU 1.90GHz (Kaby Lake R)
Faster4.47Windows 10X64Intel Core i9-10900K CPU 3.70GHz
Faster2.93Windows 11X64AMD Ryzen 9 5900X
Faster5.13Windows 11X64AMD Ryzen 9 5950X
Faster3.39Windows 11X64Intel Core i7-8700 CPU 3.20GHz (Coffee Lake)
Faster3.80Windows 11X6411th Gen Intel Core i9-11900H 2.50GHz
Faster3.46Windows 11X64Intel Core i9-9900T CPU 2.10GHz
Faster2.06ubuntu 18.04X64Intel Xeon CPU E5530 2.40GHz
Faster1.57ubuntu 18.04X64Intel Core i7-2720QM CPU 2.20GHz (Sandy Bridge)
Faster4.12ubuntu 20.04X64Intel Core i7-8700 CPU 3.20GHz (Coffee Lake)
Faster3.99Windows 10X86Intel Core i7-6700 CPU 3.40GHz (Skylake)
Faster2.21macOS Big Sur 11.6.6X64Intel Core i5-4278U CPU 2.60GHz (Haswell)

System.Memory.Span.Reverse(Size: 512)

ResultRatioOperating SystemBitProcessor Name
Slower0.57debian 11Arm64Unknown processor
Slower0.67ubuntu 18.04Arm64Unknown processor
Slower0.58ubuntu 20.04Arm64Unknown processor
Slower0.60Windows 11Arm64Microsoft SQ1 3.0 GHz
Slower0.77macOS Monterey 12.3Arm64Apple M1 Max
Faster4.30Windows 10X64Intel Core i7-6700 CPU 3.40GHz (Skylake)
Faster3.64Windows 10X64Intel Core i7-8650U CPU 1.90GHz (Kaby Lake R)
Faster3.76Windows 10X64Intel Core i9-10900K CPU 3.70GHz
Faster3.41Windows 11X64AMD Ryzen 9 5900X
Faster4.02Windows 11X64AMD Ryzen 9 5950X
Faster4.05Windows 11X64Intel Core i7-8700 CPU 3.20GHz (Coffee Lake)
Faster3.42Windows 11X6411th Gen Intel Core i9-11900H 2.50GHz
Faster3.99Windows 11X64Intel Core i9-9900T CPU 2.10GHz
Faster2.25ubuntu 18.04X64Intel Xeon CPU E5530 2.40GHz
Faster1.79ubuntu 18.04X64Intel Core i7-2720QM CPU 2.20GHz (Sandy Bridge)
Faster3.56ubuntu 20.04X64Intel Core i7-8700 CPU 3.20GHz (Coffee Lake)
Faster4.00Windows 10X86Intel Core i7-6700 CPU 3.40GHz (Skylake)
Faster2.84macOS Big Sur 11.6.6X64Intel Core i5-4278U CPU 2.60GHz (Haswell)

System.Memory.Span.Reverse(Size: 512)

ResultRatioOperating SystemBitProcessor Name
Slower0.57debian 11Arm64Unknown processor
Slower0.67ubuntu 18.04Arm64Unknown processor
Slower0.58ubuntu 20.04Arm64Unknown processor
Slower0.59Windows 11Arm64Microsoft SQ1 3.0 GHz
Slower0.33macOS Monterey 12.3Arm64Apple M1 Max
Faster7.07Windows 10X64Intel Core i7-6700 CPU 3.40GHz (Skylake)
Faster6.52Windows 10X64Intel Core i7-8650U CPU 1.90GHz (Kaby Lake R)
Faster6.29Windows 10X64Intel Core i9-10900K CPU 3.70GHz
Faster11.22Windows 11X64AMD Ryzen 9 5900X
Faster15.82Windows 11X64AMD Ryzen 9 5950X
Faster6.58Windows 11X64Intel Core i7-8700 CPU 3.20GHz (Coffee Lake)
Faster7.88Windows 11X6411th Gen Intel Core i9-11900H 2.50GHz
Faster6.65Windows 11X64Intel Core i9-9900T CPU 2.10GHz
Faster4.59ubuntu 18.04X64Intel Xeon CPU E5530 2.40GHz
Faster2.97ubuntu 18.04X64Intel Core i7-2720QM CPU 2.20GHz (Sandy Bridge)
Faster7.16ubuntu 20.04X64Intel Core i7-8700 CPU 3.20GHz (Coffee Lake)
Faster6.09Windows 10X86Intel Core i7-6700 CPU 3.40GHz (Skylake)
Faster7.24macOS Big Sur 11.6.6X64Intel Core i5-4278U CPU 2.60GHz (Haswell)

@AndyAyersMS

AndyAyersMS commented Jun 28, 2022

Copy link
Copy Markdown
Member

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Memorycommunity-contributionIndicates that the PR has been added by a community membertenet-performancePerformance related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

15 participants

@alexcovington@stephentoub@saucecontrol@danmoseley@gfoidl@tannergooding@adamsitnik@dakersnar@AndyAyersMS@jkotas@deeprobin@Neme12@GSPP@teo-tsirpanis@Wraith2