Yes it is in the global scope. I entered everything right into the 
interpreter.

I retried by creating functions:

function multiply(A::Matrix, B::Matrix)
 @timeA*B
end

function benchmark(N::Int)
 A = rand(N, N)
 B = rand(N, N)
 for i=1:10
  multiply(A, B)
 end
end

benchmark(5000)

elapsed time: 4.534866754 seconds (200000112 bytes allocated)
elapsed time: 4.538866875 seconds (200000112 bytes allocated)
elapsed time: 4.528996845 seconds (200000112 bytes allocated)
elapsed time: 4.548095912 seconds (200000112 bytes allocated)
elapsed time: 4.553692097 seconds (200000112 bytes allocated)
elapsed time: 4.629964016 seconds (200000112 bytes allocated)
elapsed time: 4.561603167 seconds (200000112 bytes allocated)
elapsed time: 4.67098846 seconds (200000112 bytes allocated)
elapsed time: 4.617811149 seconds (200000112 bytes allocated)
elapsed time: 4.632597152 seconds (200000112 bytes allocated)

So as you can see this way it works correctly. However I still do not get 
why my previous code that I ran in the global scope increased in run time. 
Could you explain that?

Reply via email to