Hi

I wrote the following benchmark and I got some weird results which I am 
unsure of their correctness.

a=fill(1.0,10000000);
b=fill(0.0,10000000);

f()=@elapsed @parallel for i=1:10000000
       b[i]=a[i]
end

I get the following results-

julia> f()
0.001288817

julia> f()
4.0828e-5

julia> f()
4.3807e-5

julia> f()
4.2003e-5

The first result is probably due to function f() being compiled and after 
that, there is couple of orders of magnitude gain in performance. Is this 
benchmark correct or there is some problem with the code ? 

The corresponding C code takes on average 0.029588 seconds. Is Julia that 
much faster than C ?

--
Kapil

Reply via email to