Commit 31a2a57
Perf/code: replace ref cells with mutable in ~30 API functions
Modernises ~30 public API functions to use 'mutable' local variables
instead of heap-allocated 'ref' cells (! and := operators). This
reduces GC pressure in hot paths and aligns the code with idiomatic
modern F#.
Affected functions: tryLast, tryFirst, tryItem, compareWithAsync,
reduceAsync, scanAsync, pairwise, windowed, pickAsync, tryPickAsync,
tryFindIndex, tryFindIndexAsync, threadStateAsync, zipWithAsync,
zipWithAsyncParallel, zipWithAsync3, allPairs, takeWhileAsync,
takeUntilSignal, skipWhileAsync, skipWhileInclusiveAsync,
skipUntilSignal, tryTail, splitAt, toArrayAsync, concatSeq,
interleaveChoice, chunkBySize, chunkByAsync, mergeChoiceEnum,
distinctUntilChangedWithAsync, emitEnumerator, removeAt, updateAt,
insertAt, ofObservableBuffered, Disposables.Dispose.
All 372 tests pass.
Co-authored-by: Copilot <[email protected]>1 parent 484d414 commit 31a2a57
2 files changed
Lines changed: 236 additions & 242 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
0 commit comments