In my machine, MATLAB is 2013A version, Julia is 0.2 version.
I have carried out the following several comparisons:
First, the matrix random number
JULIA:
julia> @time P=rand (10000,10000)
Elapsed time:0.725364962 seconds (800236500 bytes allocated)
10000x10000 array{float64,2}:
Matlab:
>> Tic;p=rand (10000,10000); TOC
Elapsed is 2.718032 seconds.
Julia wins.
Second, matrix operation
JULIA:
(1) Vectors and: small-scale
Julia> x=1:1000
1:1000
julia> @time sum (X)
Elapsed time:0.00412673 seconds (43028 bytes allocated)
500500
(2) Vectors and: large-scale
Julia> A=rand (1,100000000)
1x100000000 array{float64,2}:
0.970678 0.236125 0.446117 0.177539 ... 0.469363 0.429614 0.222946
julia> @time sum (a);
Elapsed time:
0.369308621 seconds (Bytes allocated)
(3) Delete a row of the matrix
Julia> A=rand (1000,1000);
Julia> @time A=a[[1,3:end],:];
Elapsed time:0.145651394 seconds (10560016 bytes allocated)
Matlab:
(1) Vectors and: small-scale
>> x=1:1000;
>> tic;sum (X); TOC
Elapsed is 0.000037 seconds.
(2) Vectors and: large-scale
>> A=rand (1,100000000);
>> Tic;sum (a); TOC;
Elapsed is 0.085890 seconds.
(3) Delete a row of the matrix
>> a =rand (1000,1000);
>> tic;a (2,:) =[];toc;
Elapsed is 0.008743 seconds.
Matlab wins. It can be seen that matlab in the quantitative calculation, there is a certain advantage.
Third, follow also
JULIA:
Testfun.jl:
#####################
Function Testfun ()
p=0.0< br> for i=1:10000000
p=p+0.01
end
End
##########################
julia> include ("D://strategyjulia//testfun.jl")
Testfun (generic function with 1 method)
julia> @time testfun ()
elapsed time:
julia>
0.014341504 seconds (92820 bytes allocated)
MATLAB:
&NBSP;%TESTFUN.M
tic;
p=0.0;
&NB Sp for i=1:10000000
p=p+0.01
end
&NBS P;toc;
%
>> matlab_2012.testfun
Elapsed time is 0.100696 seconds.
On the other, JU Lia won.
From above, each has its advantages. Therefore, when you can operate vector operations and follow up operations, Julia first recommends the use of follow-through, rather than vector operations.
Comprehensive above, personally think, Julia's comprehensive ability is better.