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
Using LazyArrays.jl, I found a speed problem with the assignment of arrays of Bool:
using BenchmarkTools, LazyArrays
x =1:2000.<1000
y = (1:1900)'.<1000
a = x .* y;
@btime a .=$x .*$y; # 2.8 ms
la =LazyArray(@~ x .* y);
@btime a =collect($la); # 2.6 ms@btime a .=$la; # 30.8 ms (Problem!)
as can be seen, the last assignment, which indeed uses very little memory is much (>10x) slower than collecting the LazyArray, which should have the additional costs of memory allocation.
The text was updated successfully, but these errors were encountered:
Using
LazyArrays.jl
, I found a speed problem with the assignment of arrays of Bool:as can be seen, the last assignment, which indeed uses very little memory is much (>10x) slower than collecting the LazyArray, which should have the additional costs of memory allocation.
The text was updated successfully, but these errors were encountered: