Compilation warnings resolved
This commit is contained in:
1 parent
450701f800
commit
0951b442ae
7 files changed
+19
-19
No files matched your search
@@ -8,7 +8,7 @@ namespace Recyclable.Collections.Benchmarks
|
||||
//[Benchmark(Baseline = false)]
|
||||
public void Array_Count()
|
||||
{
|
||||
var data = _testArray;
|
||||
var data = TestObjects;
|
||||
DoNothing(data.Length);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Recyclable.Collections.Benchmarks
|
||||
//[Benchmark(Baseline = true)]
|
||||
public void PooledList_Count()
|
||||
{
|
||||
var data = _testPooledList;
|
||||
var data = TestObjectsAsPooledList;
|
||||
DoNothing(data.Count);
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Recyclable.Collections.Benchmarks
|
||||
//[Benchmark(Baseline = false)]
|
||||
public void RecyclableList_Count()
|
||||
{
|
||||
var data = _testRecyclableList;
|
||||
var data = TestObjectsAsRecyclableList;
|
||||
DoNothing(data.Count);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace Recyclable.Collections.Benchmarks
|
||||
[Benchmark(Baseline = true)]
|
||||
public void PooledList_GetItem()
|
||||
{
|
||||
var data = _testPooledList;
|
||||
var data = TestObjectsAsPooledList;
|
||||
var dataCount = TestObjectCount;
|
||||
for (var i = 0; i < dataCount; i++)
|
||||
{
|
||||
@@ -51,7 +51,7 @@ namespace Recyclable.Collections.Benchmarks
|
||||
[Benchmark(Baseline = false)]
|
||||
public void RecyclableList_GetItem()
|
||||
{
|
||||
var data = _testRecyclableList;
|
||||
var data = TestObjectsAsRecyclableList;
|
||||
var dataCount = TestObjectCount;
|
||||
for (var i = 0; i < dataCount; i++)
|
||||
{
|
||||
@@ -62,7 +62,7 @@ namespace Recyclable.Collections.Benchmarks
|
||||
[Benchmark(Baseline = false)]
|
||||
public void RecyclableList_GetItem_AsSpan()
|
||||
{
|
||||
var data = _testRecyclableList;
|
||||
var data = TestObjectsAsRecyclableList;
|
||||
int blockSize = data.BlockSize;
|
||||
int nextItemBlockIndex = data.NextItemBlockIndex;
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace Recyclable.Collections.Benchmarks
|
||||
[Benchmark(Baseline = false)]
|
||||
public void RecyclableList_GetItem_AsArray()
|
||||
{
|
||||
var data = _testRecyclableList;
|
||||
var data = TestObjectsAsRecyclableList;
|
||||
int blockSize = data.BlockSize;
|
||||
int nextItemBlockIndex = data.NextItemBlockIndex;
|
||||
|
||||
@@ -118,7 +118,7 @@ namespace Recyclable.Collections.Benchmarks
|
||||
[Benchmark(Baseline = false)]
|
||||
public void RecyclableList_GetItem_AsForEach()
|
||||
{
|
||||
var data = _testRecyclableList;
|
||||
var data = TestObjectsAsRecyclableList;
|
||||
var dataCount = TestObjectCount;
|
||||
|
||||
foreach (var item in data)
|
||||
@@ -130,7 +130,7 @@ namespace Recyclable.Collections.Benchmarks
|
||||
[Benchmark(Baseline = false)]
|
||||
public void RecyclableList_GetItem_AsWhile()
|
||||
{
|
||||
var data = _testRecyclableList;
|
||||
var data = TestObjectsAsRecyclableList;
|
||||
long dataCount = TestObjectCount;
|
||||
if (dataCount == 0)
|
||||
{
|
||||
|
||||
@@ -7,14 +7,14 @@ namespace Recyclable.Collections.Benchmarks
|
||||
//[Benchmark(Baseline = false)]
|
||||
public void Array_LongCount()
|
||||
{
|
||||
var data = _testArray;
|
||||
var data = TestObjects;
|
||||
DoNothing(data.LongLength);
|
||||
}
|
||||
|
||||
//[Benchmark(Baseline = false)]
|
||||
public void RecyclableList_LongCount()
|
||||
{
|
||||
var data = _testRecyclableList;
|
||||
var data = TestObjectsAsRecyclableList;
|
||||
DoNothing(data.LongCount);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ namespace Recyclable.Collections.Benchmarks
|
||||
[MemoryDiagnoser]
|
||||
public partial class RecyclableCollectionsBenchmarks : BenchmarkBase
|
||||
{
|
||||
private long[] _testArray;
|
||||
private RecyclableArrayList<long> _testRecyclableArrayList;
|
||||
private RecyclableList<long> _testRecyclableList;
|
||||
private PooledList<long> _testPooledList;
|
||||
private long[]? _testArray;
|
||||
private RecyclableArrayList<long>? _testRecyclableArrayList;
|
||||
private RecyclableList<long>? _testRecyclableList;
|
||||
private PooledList<long>? _testPooledList;
|
||||
|
||||
public PooledList<long> TestObjectsAsPooledList => _testPooledList ?? throw new NullReferenceException("Something is wrong and the field is not initialized");
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace Recyclable.Collections.Benchmarks
|
||||
//[Benchmark(Baseline = true)]
|
||||
public void PooledList_SetItem()
|
||||
{
|
||||
var data = _testPooledList;
|
||||
var data = TestObjectsAsPooledList;
|
||||
var dataCount = TestObjectCount;
|
||||
for (var i = 0; i < dataCount; i++)
|
||||
{
|
||||
@@ -53,7 +53,7 @@ namespace Recyclable.Collections.Benchmarks
|
||||
//[Benchmark(Baseline = false)]
|
||||
public void RecyclableList_SetItem()
|
||||
{
|
||||
var data = _testRecyclableList;
|
||||
var data = TestObjectsAsRecyclableList;
|
||||
var dataCount = TestObjectCount;
|
||||
for (var i = 0; i < dataCount; i++)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user