We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ShuffleTakeIterator.GetCount
1 parent 8d06783 commit 58b068bCopy full SHA for 58b068b
src/libraries/System.Linq/src/System/Linq/Shuffle.SpeedOpt.cs
@@ -146,7 +146,7 @@ public override void Dispose()
146
147
public override int GetCount(bool onlyIfCheap) =>
148
TryGetNonEnumeratedCount(_source, out int count) ? Math.Min(_takeCount, count) :
149
- !onlyIfCheap ? Math.Min(_takeCount, _source.Take(_takeCount).Count()) :
+ !onlyIfCheap ? _source.Take(_takeCount).Count() :
150
-1;
151
152
public override TSource? TryGetFirst(out bool found) =>
0 commit comments