time of execution of a code in matlab

2 visualizaciones (últimos 30 días)
emar
emar el 12 de Abr. de 2017
Comentada: emar el 13 de Abr. de 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 comentarios
Stephen23
Stephen23 el 13 de Abr. de 2017
Better options for timing code would be to use the inbuilt timeit, or the FEX submission timeit.
emar
emar el 13 de Abr. de 2017
Even with timeit, i still have the same results.

Iniciar sesión para comentar.

Respuesta aceptada

Jan
Jan el 13 de Abr. de 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 comentario
emar
emar el 13 de Abr. de 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 !

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Downloads en Help Center y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Community Treasure Hunt

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

Start Hunting!

Translated by