Whether ADD SEMICOLON for output will reduce execution time?
2 次查看(过去 30 天)
显示 更早的评论
If my code compute data for 1 day. If I ADD SEMICOLON after the statements, means nothing display in Command Windows, does this will reduce execution time greatly?
0 个评论
采纳的回答
Star Strider
2016-3-8
The only way to determine that quantitatively is to time it with and without the semicolons. Adding semicolons to suppress Command Window output would speed your code. You would have to define whether it speeds it ‘greatly’. For short routines, likely not much. For long or iterated routines, likely much.
4 个评论
Star Strider
2016-3-8
My pleasure.
When I first started using MATLAB 20+ years ago, etime was the only option, so I got used to using it. The tic and toc functions arrived later, and are preferable.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Type Identification 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!