Skip to content

Instantly share code, notes, and snippets.

View jason-c-daniels's full-sized avatar
🤪

Jason C. Daniels jason-c-daniels

🤪
View GitHub Profile
@jason-c-daniels
jason-c-daniels / AllocationsBenchmarks.cs
Last active August 14, 2024 20:38
BenchmarkDotNet - 0.14.0 - working on home laptop
public class AllocationsBenchmarks
{
[Benchmark]
[ArgumentsSource(nameof(SizesToAllocate))]
public byte[] Allocate_Byte_Array_With_Size(int size)
=> new byte[size];
[Benchmark]
[ArgumentsSource(nameof(SizesToAllocate))]
[MethodImpl(MethodImplOptions.AggressiveInlining)]