Why is Octave slower than MATLAB?

后端 未结 2 1452
慢半拍i
慢半拍i 2020-12-24 05:45

I have been using Octave and MATLAB for a few projects, and I\'ve come across a few questions. This question Why/when should I prefer MATLAB over Octave?) answered several,

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-24 06:06

    There are four ways how Matlab code gets sped up:

    • JIT: compiling at runtime helps with loops but seems to speed up (or at least interact with) other parts of the code as well, according to my anecdotal observations.

    • Implementing functions in C/C++: There's a bunch of Matlab/Octave functions that are implemented in Matlab/Octave. At every release, there's a bunch more of them that get made into built-ins.

    • Multithreading: There's a list of functions that have multithreaded implementations, which will speed up function calls.

    • Generally more efficient implementations. For example the median filter got a massive speed boost for integer inputs a few releases ago.

    All of these approaches need developers dedicated to make code faster. As far as I know, a major concern of Octave developers is to make sure (Matlab) functionality is there at all, whereas performance increase seems to have been a focus of Matlab development in the last few years.

提交回复
热议问题