[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fw: GNU Octave vs. Matlab calculation time performance

From: Nicholas Jankowski
Subject: Re: Fw: GNU Octave vs. Matlab calculation time performance
Date: Wed, 27 Feb 2019 10:16:00 -0500

On Wed, Feb 27, 2019 at 9:29 AM "Gökhan Sen" <address@hidden> wrote:
I've send my fit also to Mr. Eaton, but maybe there are other support available,
which could be also helpfull!
Many thx. in advance,
Kind regards, 
Gökhan Sen
Gesendet: Mittwoch, 27. Februar 2019 um 14:58 Uhr
Von: "Gökhan Sen" <address@hidden>
An: address@hidden
Betreff: GNU Octave vs. Matlab calculation time performance
Hello Mr. Eaton,
I'm a big fan from gnu octave and the very impressive possible usuabla applications.
But sometimes it seems, that the calculation speed lacks in comparison with commercial Version e.g. Matlab.
I've add a simple script (also as m-file), which is do a simple calculation operation.
The calculation time / output from these script as following is:

 The example you had demonstrates the simple fact that matlab and octave are generally optimized for vectorized code, and your loop performs one element at a time an operation that can be trivially done without a loop. e.g., replace your for loop with :

V = 1.2345 .* V

and you will notice that both Matlab and Octave perform the operation very quickly.

matlab has managed to implement a Just In Time compiler that likely looks at the for loop and optimizes it for higher speed vectorized calculation.   Octave does not have a functioning JIT compiler yet, and as such it's looped performance suffers greatly.  This is a known current limitation.  Calculations will be correct, but those that rely on heavily looped, non-vectorized, code will be slower.  Such is the reality of an all volunteer programming effort. 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]