Instability of computation time for a matlab code
3 ビュー (過去 30 日間)
古いコメントを表示
Hi, I am testing a matlab code to evaluate computation time of my program. I used tic/toc as a measure for the elaspsed time, and operated for a total of 500 times. Below shows results of the testing, i.e., computation time (in sec) versus time of running. As can be seen in the plot, computation time before 230 times of running is quite stable, around 15 sec/run. However, in the later part of the testing, the computation time is quite unstable. Accounting all 500 times of running will give an average computation time of 24 sec/run, instead of 15 sec/run for 230 times of running.
I have some questions: 1). Which value should I used to evalute the computation speed of my code? 15 or 24 sec/run; 2). What is the reason for such variations in the later part of my program? Does this mean my program is unstable? or does all matlab programs behave the same way?
Thanks a lot! :)

0 件のコメント
回答 (1 件)
Image Analyst
2018 年 7 月 17 日
Maybe a virus scan or backup was happening during the slow times, or a corporate download of new or additional software. These things happen all the time with me and affect all programs, not just MATLAB.
3 件のコメント
Image Analyst
2018 年 7 月 17 日
Are you using Windows? Type control-shift-Esc to bring up the task list and see how much CPU, disk, or internet is being used and by what programs. In Windows 10 look at the performance tab to see time plots of them all. Windows Superfetch process is often a guilty party - just Google it.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!