Why is datenummx(clock) faster than now()?
4 views (last 30 days)
Show older comments
Dan Couture on 2 Jan 2013
Why is running datenummx(clock) 4x faster than the standard now() call? https://gist.github.com/4432190
per isakson on 2 Jan 2013
Edited: per isakson on 2 Jan 2013
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.
per isakson on 3 Jan 2013
Edited: per isakson on 3 Jan 2013
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.
More Answers (0)
Find more on Solver Outputs and Iterative Display in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!