Open
Description
Processing dotnet/runtime#108205 (comment) command:
Command
-intel -aws_amd -perf
using System.Buffers.Binary;
using System.Runtime.InteropServices;
using BenchmarkDotNet.Attributes;
public unsafe class Bench
{
static void* src;
static void* dst;
[GlobalSetup]
public void Setup()
{
src = NativeMemory.AlignedAlloc(1024 * 4, 64);
dst = NativeMemory.AlignedAlloc(1024 * 4, 64);
}
[GlobalCleanup]
public void Cleanup()
{
NativeMemory.AlignedFree(src);
NativeMemory.AlignedFree(dst);
}
[Benchmark]
public void Reverse() =>
BinaryPrimitives.ReverseEndianness(
new ReadOnlySpan<int>(src, 1024),
new Span<int>(dst, 1024));
}
(EgorBot will reply in this issue)
Metadata
Metadata
Assignees
Labels
No labels