You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf: use while! in groupBy, countBy, partition, except, exceptOfSeq
Replaces the manual go-flag + initial-MoveNext pre-advance pattern with
idiomatic while! in five functions: groupBy, countBy, partition, except,
and exceptOfSeq.
The pattern being replaced (groupBy example):
let! step = e.MoveNextAsync()
let mutable go = step
while go do
// body
let! step = e.MoveNextAsync()
go <- step
After:
while! e.MoveNextAsync() do
// body
For except/exceptOfSeq the first-element check is also cleaned up:
let! hasFirst = e.MoveNextAsync()
if hasFirst then
if hashSet.Add e.Current then yield e.Current
while! e.MoveNextAsync() do ...
All changes are purely internal - no public API or behaviour change.
Verified: 5093 tests passed, 0 failures, 0 warnings, formatting OK.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: release-notes.txt
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@
2
2
Release notes:
3
3
4
4
1.0.0
5
+
- perf: use while! in groupBy, countBy, partition, except, exceptOfSeq to eliminate redundant mutable 'go' variables and initial MoveNextAsync calls
5
6
- adds taskSeqDynamic computation expression and TaskSeqDynamic/TaskSeqDynamicInfo types for dynamic (FSI-compatible) resumable code, fixing issue where taskSeq would raise NotImplementedException in F# Interactive, #246
6
7
- perf: TaskSeq.chunkBy and chunkByAsync reuse the ResizeArray buffer between chunks, reducing allocations on sequences with many chunk boundaries
7
8
- fixes: TaskSeq.insertAt, insertManyAt, removeAt, removeManyAt, updateAt now raise ArgumentNullException (not NullReferenceException) when given a null source; insertManyAt also validates the values argument
0 commit comments