Hi guys, I am new to Julia. I have been using Matlab for many years. I have been told that Julia can offer great improvements in terms of performance. After doing a very preliminary intro course on Julia I started hacking around and to try to understand how to write code that is actually faster. So far all the benchmark attempts I have tried failed miserably, in the sense that Matlab is always much much faster. Obviously I must be doing something wrong. Can anybody give some tips?
For example, I thought Julia would be much faster at running loops. So I tried the following in both Matlab and Julia (on the same computer)
aa = zeros(Float32,100);
bb = ones(Float32,100);
cc = ones(Float32,100);
using TickTock
tick()
for i = 1:100
for j = 1:100
for k = 1:100
cc = aa.*bb;
end
end
end
t1 = tock()
The Julia code, which I am running on Atom, runs in about 0.8 secs. The equivalent Matlab code runs in 0.1 secs. What am I missing?
thanks so much