On my old MacBook with MATLAB 2013b, julia is the faster of the two for this problem, but the exercise is mainly a comparison of OpenBLAS and MKL, I think.
2014/1/17 Eric Davies <[email protected]> > Sorry; I have an older version of MATLAB (2010a) and saw the comparison on > my machine and jumped to conclusions. I guess if I had 2012+ I would see > MATLAB still being faster. > > I'll pay attention to allocated bytes in the future. > > > On Friday, 17 January 2014 13:33:15 UTC-6, Kevin Squire wrote: > >> If you look at the bytes allocated, it seems that Andrea did that. >> >> What version of Julia are you running, Andrea? >> >> Kevin >> >> >> On Fri, Jan 17, 2014 at 11:31 AM, Eric Davies <[email protected]> wrote: >> >>> Running once before will cause compilation of the called functions for >>> the given types. >>> >>> julia> A = randn(1000,1000); A = A+A'+eye(1000); x = randn(1000); >>> >>> julia> @time A\x; >>> @time A\x; >>> elapsed time: 0.752317463 seconds (48614156 bytes allocated) >>> >>> julia> @time A\x; >>> @time A\x; >>> elapsed time: 0.031127576 seconds (8016424 bytes allocated) >>> >>> Any subsequent calls to A\x with different random initializations will >>> have performance like the second call shown here. >>> >>> >>> On Friday, 17 January 2014 13:21:21 UTC-6, 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 >>>> >>> >> -- Med venlig hilsen Andreas Noack Jensen
