I am trying to do in parallel some stuff. Based on @time the performance is excellent, but I am actually waiting quite long in front of my computer. The code is something like below.
function max(n)
rand_n = SharedArray{Float64}(n, n)
@distributed for i in 1:n
@distributed for j in 1:n
r = Random(Uniform(), 100)
rand_n[i,j] = StatsBase.maximum(EV0)
end
end
rand_n
end
@time max(1000)
0.000166 seconds (118 allocations: 18.203 KiB)
tick()
max(1000)
tock()
2.865833086s: 2 seconds, 865 milliseconds
So the actual time elapsed on the computer is much longer that what @time says.
btimewill do this since it runs your code many times to get accurate timings, but a simpletimecall really shouldn't do this. That's really weird