Azzera filtri
Azzera filtri

time of execution of a code in matlab

3 visualizzazioni (ultimi 30 giorni)
emar
emar il 12 Apr 2017
Commentato: emar il 13 Apr 2017
Hello, To compare the time of execution of two functions, i wrote a code where i measure the time elapsed for each function and for each index ( with the command clock /etime). However, on my computer the first function is faster than the second, and on an other computer, it's the opposite. ( I tried several time with different indexes and with clearing for each time the data ,but it is still the same result).
Can you explain me why there is such difference?
On both of them, Matlab version is r2017a , the only difference is that on one computer, the compiler is MinGW 4.9.2 ,and on the other one it's Microsoft Windows SDK 7.1 .
Thanks in advance
  6 Commenti
Stephen23
Stephen23 il 13 Apr 2017
Better options for timing code would be to use the inbuilt timeit, or the FEX submission timeit.
emar
emar il 13 Apr 2017
Even with timeit, i still have the same results.

Accedi per commentare.

Risposta accettata

Jan
Jan il 13 Apr 2017
Can you find the code lines inside freqxorr which are accelereated on the faster computer. It could either be multi-threading and a higher number of cores, or the data might match into a larger CPU cache, or the internally used library can use the SSE or AVX features fo the younger processor. Nevertheless, it is not surprising, that different functions can profit differently on different CPUs.
  1 Commento
emar
emar il 13 Apr 2017
Exactly, in the first computer there is 44 cores so that's why fft2 is faster than the other computer (12 cores). Thank you for your help !

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Downloads in Help Center e File Exchange

Tag

Non è stata ancora inserito alcun tag.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by