You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A=rand(3000);B=rand(3000);
tic;for k=1:50;C=A.*B;end;toc
Elapsed time is 1.501691 seconds.
This is on a 2 core machine. I also ran it on another computer with 6 cores and the difference is greater (about 4x). So it seems Matlab is using parallelism for .* while Julia isn't. A little experimentation in Matlab shows that it drops to 1 core when the matrix size is 191x191 or smaller.
The text was updated successfully, but these errors were encountered:
What is the issue here? Julia does not run multithreaded code yet so naturally it will be slower. Your best bet right now is the ParallelAccelerator.jl package.
>> A=rand(3000);B=rand(3000);
tic;for k=1:50;C=A.*B;end;toc
Elapsed time is 1.429565 seconds.
>> tic;for k=1:50;C=A.*B;end;toc
Elapsed time is 1.455223 seconds.
Also on a 2 core machine. Seems like there is an initial compilation pass involved that is skewing the difference?
Julia 0.4:
julia> A=rand(3000,3000);B=rand(3000,3000);
julia> tic();for k=1:50;C=A.*B;end;toc()
elapsed time: 2.386786733 seconds
2.386786733
Matlab 2013a:
This is on a 2 core machine. I also ran it on another computer with 6 cores and the difference is greater (about 4x). So it seems Matlab is using parallelism for .* while Julia isn't. A little experimentation in Matlab shows that it drops to 1 core when the matrix size is 191x191 or smaller.
The text was updated successfully, but these errors were encountered: