Is it possible to change the 'ClockPrecision' setting of MATLAB's Profiler?
显示 更早的评论
The default ClockPrecision value is apparently 0.001 seconds. If a function or line takes less time than that, it registers as 0. I'm trying to assess the efficiency of a few different algorithms to compare them, but none of them take long enough to round up to 1 millisecond. I could not find any way to change this, since it isn't one of the options like 'timer' and 'history' according to the documentation page:
However, I did find this page:
which does not describe how to change the setting, but shows a different value (100 nanoseconds) than what I have (1 millisecond). I'm hoping that means it can be changed, but I can't figure out how.
Thanks in advance for any help.
采纳的回答
更多回答(1 个)
Philip Borghesani
2015-6-26
The ClockPrecision is based on the timer used, change the profile timer source for a different precision. If you have access to R2015b the processor timer gives the highest precision.
profile -Timer real %
类别
在 帮助中心 和 File Exchange 中查找有关 Performance and Memory 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!