Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EgorBot for EgorBo in #109570 #153

Open
EgorBot opened this issue Nov 9, 2024 · 0 comments
Open

EgorBot for EgorBo in #109570 #153

EgorBot opened this issue Nov 9, 2024 · 0 comments

Comments

@EgorBot
Copy link
Owner

EgorBot commented Nov 9, 2024

Processing dotnet/runtime#109570 (comment) command:

Command

-aws_cached2_genoa

using System.Runtime.InteropServices;
using BenchmarkDotNet.Attributes;
using System.Runtime.CompilerServices;
using BenchmarkDotNet.Running;

BenchmarkSwitcher.FromAssembly(typeof(Bench).Assembly).Run(args);

public unsafe class Bench
{
    static byte* _srcAlign64;
    static byte* _srcAlign8;

    [GlobalSetup]
    public void Setup()
    {
        _srcAlign64 = (byte*)NativeMemory.AlignedAlloc(1024 * 1024, 64);
        _srcAlign8 = _srcAlign64 + 8;
    }

    [GlobalCleanup]
    public void Cleanup() => NativeMemory.AlignedFree(_srcAlign64);

    [Benchmark] public void Zero256_Align64() => Unsafe.InitBlockUnaligned(_srcAlign64, 0, 256);
}

(EgorBot will reply in this issue)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant