Benchmark organization improvements to reuse code.

This commit is contained in:
mlemanczyk committed 2023-04-30 21:24:12 +02:00
1 parent c45af6a884
commit 46b074a35c
4 files changed
+55 -20

No files matched your search

@@ -0,0 +1,20 @@
namespace Recyclable.Collections.Benchmarks.Core
{
public class DataGenerator
{
public static long[] EnumerateTestObjects(long testObjectCount)
{
var result = new long[testObjectCount];
Console.WriteLine("******* TEST DATA ARRAY CREATED *******");
Span<long> resultSpan = result;
for (int i = 0; i < testObjectCount; i++)
{
resultSpan[i] = i;
}
return result;
}
}
}