Why is datenummx(clock) faster than now()?
3 ビュー (過去 30 日間)
古いコメントを表示
Why is running datenummx(clock) 4x faster than the standard now() call? https://gist.github.com/4432190
0 件のコメント
採用された回答
per isakson
2013 年 1 月 2 日
編集済み: per isakson
2013 年 1 月 2 日
The function, now, has one executable line of code
t = datenum(clock);
the function, datenum, calls the function, datenummx, after having done error checking, etc.
That's why.
2 件のコメント
per isakson
2013 年 1 月 3 日
編集済み: per isakson
2013 年 1 月 3 日
I often find it difficult to understand the rational behind various design decisions of The MathWorks (TMW). Since, TMW is successful in the money-making industry, I guess TMW knows what they are doing.
Regarding datenummx I guess it is possible to make a faster function (little error checking, one OS (Windows only), maybe "in-place".) Post a new question.
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!