Does anyone knows why the float matrix multiplication is much faster in the 
following code:

function foo()

  n = 2000
  a = rand(1:10, n, n)
  b = rand(n, n)
  @time a*a
  @time b*b
  
  nothing
end

I get:


julia> test()
  6.715335 seconds (9 allocations: 30.518 MB, 0.00% gc time)
  0.120801 seconds (3 allocations: 30.518 MB, 7.88% gc time)

Thanks!

(btw, I tried using A_mul_B! and the time improvement was not 
significant...)

Reply via email to