Commit a021713
Increment state conditionally in
Fixes #53430
```julia
julia> a = rand(100,100); b = similar(a); av = view(a, axes(a)...); bv = view(b, axes(b)...); bv2 = view(b, UnitRange.(axes(b))...);
julia> @Btime copyto!($bv2, $av); # slow, indices are UnitRanges
12.352 μs (0 allocations: 0 bytes) # master, v"1.13.0-DEV.745"
1.662 μs (0 allocations: 0 bytes) # this PR
julia> @Btime copyto!($bv, $av); # reference
1.733 μs (0 allocations: 0 bytes)
```
The performances become comparable after this PR.
I've also renamed the second `I` to `Itail`, as the two variables
represent different quantities.
(cherry picked from commit 36a4616)CartesianIndices iteration (#58742)1 parent 520c4c1 commit a021713
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
446 | | - | |
447 | 446 | | |
| 447 | + | |
448 | 448 | | |
449 | 449 | | |
450 | | - | |
451 | | - | |
| 450 | + | |
| 451 | + | |
452 | 452 | | |
453 | 453 | | |
454 | 454 | | |
| |||
0 commit comments