JuliaApproximation / SingularIntegralEquations.jl

Julia package for solving singular integral equations
Other
62 stars 11 forks source link

Performance regression in v0.5 #77

Open MikaelSlevinsky opened 8 years ago

MikaelSlevinsky commented 8 years ago

Due to certain regressions affecting ApproxFun in Julia v0.5 (https://github.com/ApproxFun/ApproxFun.jl/issues/385), the fundamental solution of the Gravity Helmholtz equation is about 100-200 times slower than in v0.4. Compare the following timings with the original post #42.

julia> using ApproxFun, SingularIntegralEquations

julia> x = 10complex(2rand(1000)-1,2rand(1000)-1);y = 10complex(2rand(1000)-1,2rand(1000)-1);E = 0.0;

julia> @time lhelmfs(x,y,E);
  2.372244 seconds (4.81 M allocations: 89.139 MB, 0.72% gc time)

julia> x = 10complex(2rand(1000)-1,2rand(1000)-1);y = 10complex(2rand(1000)-1,2rand(1000)-1);E = 10.0;

julia> @time lhelmfs(x,y,E);
  4.569159 seconds (9.28 M allocations: 171.868 MB, 0.60% gc time)

julia> x = 10complex(2rand(1000)-1,2rand(1000)-1);y = 10complex(2rand(1000)-1,2rand(1000)-1);E = -10.0;

julia> @time lhelmfs(x,y,E);
  4.395984 seconds (8.89 M allocations: 164.634 MB, 0.64% gc time)
MikaelSlevinsky commented 7 years ago

This appears to have improved in 0.6.0-pre.alpha.173:

julia> using ApproxFun, SingularIntegralEquations

julia> x = 10complex.(2rand(1000)-1,2rand(1000)-1);y = 10complex.(2rand(1000)-1,2rand(1000)-1);E = 0.0;

julia> @time lhelmfs(x,y,E);
  0.016189 seconds (11 allocations: 63.500 KiB)

julia> x = 10complex.(2rand(1000)-1,2rand(1000)-1);y = 10complex.(2rand(1000)-1,2rand(1000)-1);E = 10.0;

julia> @time lhelmfs(x,y,E);
  0.027834 seconds (11 allocations: 63.500 KiB)

julia> x = 10complex.(2rand(1000)-1,2rand(1000)-1);y = 10complex.(2rand(1000)-1,2rand(1000)-1);E = -10.0;

julia> @time lhelmfs(x,y,E);
  0.024978 seconds (11 allocations: 63.500 KiB)
MikaelSlevinsky commented 7 years ago

Somehow, the GreensFun constructor still stalls on lhelmfs.