Consider the following REPL lines using BenchmarkTools:
BenchmarkTools
julia> N = 10^2; M = collect(reshape(1:N^2,N,N)); e = collect(1:N); # N=100 julia>