-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
A question of performance (for code that I wrote). I have noticed that creating finite subsections of matrices can sometimes be slow:
julia> Z = ZernikeAnnulus(0.5,1,1); wZ = Weighted(Z);
julia> @time Δ = Z \ (Laplacian(axes(Z,1)) * wZ);
0.002635 seconds (2.40 k allocations: 240.312 KiB)
julia> @time Δ[Block.(1:20),Block.(1:20)];
0.185276 seconds (498.23 k allocations: 26.108 MiB, 8.23% gc time)
versus
julia> @time L = Z \ wZ;
0.000005 seconds (2 allocations: 256 bytes)
julia> @time L[Block.(1:20), Block.(1:20)];
5.623841 seconds (7.67 M allocations: 605.328 MiB, 1.50% gc time)
Even if I rewrite Z \ wZ
using BroadcastVector
, I get similar timings.. Any ideas @dlfivefifty?
Metadata
Metadata
Assignees
Labels
No labels