Commit 7c774fe
* Perf: optimise filterAsync, chooseAsync, and foldAsync with direct enumerators
- filterAsync: replace asyncSeq-builder with OptimizedFilterAsyncEnumerator,
avoiding AsyncGenerator allocation and generator-chain dispatch per element.
- chooseAsync (non-AsyncSeqOp path): replace asyncSeq-builder with
OptimizedChooseAsyncEnumerator for the same reason.
- foldAsync (non-AsyncSeqOp path): replace scanAsync+lastOrDefault composition
with a direct loop, eliminating the intermediate async sequence and its
generator machinery entirely.
- Add AsyncSeqFilterChooseFoldBenchmarks and AsyncSeqPipelineBenchmarks to
measure the affected operations and catch future regressions.
All 317 existing tests pass.
Co-authored-by: Copilot <[email protected]>
* ci: trigger checks
* benchmarks: switch runner to BenchmarkSwitcher for full CLI arg support
Use BenchmarkSwitcher.FromAssembly instead of custom argument parsing,
so BenchmarkDotNet CLI options (--filter, --job short, --inProcess, etc.)
work out of the box when running the benchmarks directly.
Co-authored-by: Copilot <[email protected]>
* ci: trigger checks
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <[email protected]>
1 parent 57ce45e commit 7c774fe
3 files changed
Lines changed: 150 additions & 48 deletions
File tree
- src/FSharp.Control.AsyncSeq
- tests/FSharp.Control.AsyncSeq.Benchmarks
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
1 | 8 | | |
2 | 9 | | |
3 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
924 | 924 | | |
925 | 925 | | |
926 | 926 | | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
927 | 977 | | |
928 | 978 | | |
929 | 979 | | |
| |||
1008 | 1058 | | |
1009 | 1059 | | |
1010 | 1060 | | |
1011 | | - | |
1012 | | - | |
1013 | | - | |
1014 | | - | |
1015 | | - | |
1016 | | - | |
| 1061 | + | |
1017 | 1062 | | |
1018 | 1063 | | |
1019 | 1064 | | |
| |||
1022 | 1067 | | |
1023 | 1068 | | |
1024 | 1069 | | |
1025 | | - | |
1026 | | - | |
1027 | | - | |
1028 | | - | |
| 1070 | + | |
| 1071 | + | |
1029 | 1072 | | |
1030 | 1073 | | |
1031 | 1074 | | |
| |||
1271 | 1314 | | |
1272 | 1315 | | |
1273 | 1316 | | |
1274 | | - | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
1275 | 1328 | | |
1276 | 1329 | | |
1277 | 1330 | | |
| |||
Lines changed: 79 additions & 37 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
117 | 189 | | |
118 | | - | |
| 190 | + | |
119 | 191 | | |
120 | 192 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
0 commit comments