4 ms·
If you want to replace Matlab you should use Octave, julia is for making your next climate model, not for "hello world" ricing
by Frompo 10y ago
If you want to replace Matlab you should use Octave, julia is for making your next climate model, not for "hello world" ricing
- gaius 10y agoOctave is much slower than MATLAB.
- aurelian15 10y agoTrue, but if performance is your key concern, you shouldn't use either of them. Octave and MATLAB are great for prototyping matrix based numerical algorithms. And for this purpose I find Octave much more pleasant, since it is less nitpicky regarding its syntax. And once I have something that works and want to apply it to huge datasets, I usually rewrite my code in C++.
- IshKebab 10y agoThat's exactly why Julia was created - it's supposed to be like Matlab, but fast.
- jordigh 10y agoThe interpreter is. But if you write vectorised code, we frequently are able to outperform Matlab. Matlab used to have the same problem, and they even used to have docs on how to vectorise. When I first learned Matlab in 2004, they told me, "don't use loops". Twelve years later, you're supposed to write all the deeply-nested loops you want. So yes, most Matlab code out there is loopy, so it's slow in Octave. But if you write it for Octave and don't make it loopy, it's quite good.
- sndean 10y agoI've found the Armadillo C++ library (http://arma.sourceforge.net/ http://arma.sourceforge.net/) to be a better replacement, when concerned about speed.
- cozzyd 10y agoIME eigen3 is even better (although the template-induced hellish compilation times are a huge pain).
- sndean 10y agoI was going to say "but there's RcppArmadillo!" But now I see there's RcppEigen, too. I'll have to check it out.
- sgt101 10y agoBut speed has multiple dimensions. Yes, you can get things to go faster, quicker with three tactics : get closer to the iron (C, C++ - sometimes), use bigger iron (clusters) or (best) better programming. But the point of Julia is that at the end of the day the second and third tactic are easier for you, and not just you, everybody in the team and beyond. On the other hand everyone knows that Julia is 0.x which means that while this is the IDEA of Julia it's still not claimed as the reality - although my experience (and some other people) is that it's pretty true most of the time.
- bluenose69 10y agoWell, actually, Fortran is for making your next climate model (see e.g. the MITgcm at http://mitgcm.org/public/source_code.html http://mitgcm.org/public/source_code.html).