mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-14 16:15:41 +00:00
[ci skip] perf: convert Count to for loop with index access
This commit is contained in:
parent
76810408f2
commit
006523d342
@ -30,8 +30,9 @@ public static class SpanExtensions
|
|||||||
{
|
{
|
||||||
var count = 0;
|
var count = 0;
|
||||||
|
|
||||||
foreach (T item in source)
|
for (var index = 0; index < source.Length; index++)
|
||||||
{
|
{
|
||||||
|
T item = source[index];
|
||||||
if (item.Equals(element))
|
if (item.Equals(element))
|
||||||
{
|
{
|
||||||
count++;
|
count++;
|
||||||
|
Loading…
Reference in New Issue
Block a user