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,
Mittwoch, 27. Februar 2019 um 14:58 Uhr
"Gökhan Sen" <address@hidden
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.