Jiahao,

thanks for your comment, I restarted Matlab with the -singleCompThreadoption 
and I got similar results (0.045 seconds on average)

Eric, 
yes, I run it once to let Julia compile it, and btw, Matlab is also much 
slower the first time you run it (~ 0.3 secs the first time and than ~ 
0.045)

I agree that this is testing the libraries not the compiler or the 
language, and the more I work know Julia the more I like its features 
(types, object oriented framework, how elegant it is), but when a problem 
involves repeatedly solving linear problems like that it's good to be fast, 
or to know how fast one  can be to trade off the options

many thanks,
andrea


On Friday, 17 January 2014 19:21:21 UTC, Andrea Vigliotti wrote:
>
> Hi All,
>
> I was comparing the performance of Julia and Matlab in solving systems of 
> linear equations and I got the following
>
> Matlab:
> >> A = randn(1000); A = A+A'+eye(1000); x = randn(1000,1);
> >> tic; A\x; toc
> Elapsed time is 0.034763 seconds.
>
> Julia:
> julia> A = randn(1000,1000); A = A+A'+eye(1000); x = randn(1000);
>
> julia> @time A\x;
> elapsed time: 0.192572124 seconds (8012424 bytes allocated)
>
> I was wondering whether there is anything I can do to improve the 
> performances of Julia in solving this kind of problems?
>
> many thanks!
> andrea
>

Reply via email to