Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit cedb211

Browse files
committed
use InnerCount
1 parent ee9830f commit cedb211

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/System.Memory/tests/Performance/Perf.Span.BinarySearch.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,10 @@ private static void BenchmarkAndAssert(int size, int value, int expectedIndex)
125125
{
126126
using (iteration.StartMeasurement())
127127
{
128-
index |= span.BinarySearch(value);
128+
for (int i = 0; i < Benchmark.InnerIterationCount; i++)
129+
{
130+
index |= span.BinarySearch(value);
131+
}
129132
}
130133
}
131134
Assert.Equal(expectedIndex, index);

0 commit comments

Comments
 (0)