Move to .NET 7 SIMD intrinsics (#3584)

This commit is contained in:
Pieter-Jan Briers
2022-12-18 11:44:57 +01:00
committed by GitHub
parent de486207b3
commit a86a539c15
18 changed files with 1166 additions and 2144 deletions

View File

@@ -0,0 +1,26 @@
using BenchmarkDotNet.Attributes;
using Robust.Shared.Analyzers;
namespace Robust.Benchmarks.NumericsHelpers;
[Virtual]
[DisassemblyDiagnoser()]
public class HorizontalAddBenchmark
{
[Params(8, 32, 128)]
public int N { get; set; }
private float[] _inputA = default!;
[GlobalSetup]
public void Setup()
{
_inputA = new float[N];
}
[Benchmark]
public float Bench()
{
return Shared.Maths.NumericsHelpers.HorizontalAdd(_inputA);
}
}