You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A =randn(100, 100)
B =randn(100, 100)
C =randn(100, 100)
D =randn(100, 100)
type TestFun; endcall(::TestFun, x, y) = x+y
call(::TestFun, x, y, z) = x+y+z
julia>@timemap!(TestFun(), A, B, C);
elapsed time:2.4984e-5 seconds (80 bytes allocated)
julia>@timemap!(TestFun(), A, B, C, D);
elapsed time:0.004941339 seconds (1432016 bytes allocated)
julia>@timemap(TestFun(), B, C);
elapsed time:0.000102774 seconds (80160 bytes allocated)
julia>@timemap(TestFun(), B, C, D);
elapsed time:0.004965889 seconds (1512384 bytes allocated)
This is because map/map! with >2 arguments uses an inefficient strategy to extract the values from the input arrays. Maybe these should be staged functions?
The text was updated successfully, but these errors were encountered:
This is because
map
/map!
with >2 arguments uses an inefficient strategy to extract the values from the input arrays. Maybe these should be staged functions?The text was updated successfully, but these errors were encountered: