Why is datenummx(clock) faster than now()?
조회 수: 4 (최근 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!