Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Or, alternatively: "Look ma! No CartesianRanges!" This dramatically simplifies the generated code for iteration over CartesianRanges -- in fact, no references to CartesianRange appear in the LLVM IR with this commit. While it does simplify the code in JuliaLang#9080, it does not solve the performance problem there (I see no difference). It does, however, speed up `copy(::SubArray)` by 1.3 - 1.6x: ```jl julia> A = sub(reshape(1:5^3,5,5,5), 1:2:5, :, 1:2:5); julia> @benchmark copy!(similar(A), A) # current master ================ Benchmark Results ======================== Time per evaluation: 232.69 ns [227.97 ns, 237.42 ns] Proportion of time in GC: 0.00% [0.00%, 0.00%] Memory allocated: 0.00 bytes Number of allocations: 0 allocations Number of samples: 4301 Number of evaluations: 120601 R² of OLS model: 0.953 Time spent benchmarking: 5.53 s julia> @benchmark copy!(similar(A), A) # this PR ================ Benchmark Results ======================== Time per evaluation: 168.91 ns [165.67 ns, 172.14 ns] Proportion of time in GC: 0.00% [0.00%, 0.00%] Memory allocated: 0.00 bytes Number of allocations: 0 allocations Number of samples: 4601 Number of evaluations: 160601 R² of OLS model: 0.955 Time spent benchmarking: 5.33 s ```
- Loading branch information