I have an n-by-n matrix (n-very large) that I want to check whether it is a zero matrix or not in Julia. One of the ways that I tried is the following
using BenchmarkTools
using Random
A = rand(2000,2000); # n = 2000 for instance.
@btime all($A .== 0)
which outputs to
2.380 ms (4 allocations: 492.59 KiB)
false
Is there any other efficient ways to achieve the same?