フィルターのクリア

time of execution of a code in matlab

3 ビュー (過去 30 日間)
emar
emar 2017 年 4 月 12 日
コメント済み: emar 2017 年 4 月 13 日
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 件のコメント
Stephen23
Stephen23 2017 年 4 月 13 日
Better options for timing code would be to use the inbuilt timeit, or the FEX submission timeit.
emar
emar 2017 年 4 月 13 日
Even with timeit, i still have the same results.

サインインしてコメントする。

採用された回答

Jan
Jan 2017 年 4 月 13 日
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 件のコメント
emar
emar 2017 年 4 月 13 日
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 !

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDownloads についてさらに検索

タグ

タグが未入力です。

Community Treasure Hunt

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

Start Hunting!

Translated by