Commit 498d982
authored
fix performance of ProductIterator for non-concrete iterators (#59711)
This uses inferred element types to make the iterator state type-stable,
enabling inlining, which can enable the runtime to see the real types.
This is essentially the transform that we want inference to infer and
codegen to implement, except made explicit so that we can rely on it
actually happening.
Fix #56607
```
julia> @Btime f()
574.500 ns (2 allocations: 272 bytes) # non-const op
253.878 ns (2 allocations: 272 bytes) # const op
```1 parent 9c8886c commit 498d982
1 file changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
1176 | 1176 | | |
1177 | 1177 | | |
1178 | 1178 | | |
| 1179 | + | |
| 1180 | + | |
1179 | 1181 | | |
1180 | 1182 | | |
1181 | 1183 | | |
| |||
1188 | 1190 | | |
1189 | 1191 | | |
1190 | 1192 | | |
1191 | | - | |
1192 | | - | |
| 1193 | + | |
| 1194 | + | |
1193 | 1195 | | |
1194 | 1196 | | |
1195 | 1197 | | |
1196 | 1198 | | |
1197 | 1199 | | |
1198 | 1200 | | |
1199 | 1201 | | |
| 1202 | + | |
1200 | 1203 | | |
1201 | 1204 | | |
1202 | 1205 | | |
| |||
0 commit comments