New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add: Chrono based TIC() and TOC() in debug #7306
Conversation
Cleanup added: changing double underscore variable names to have single underscore. |
Could I request a clarification in the comment for the old TIC/TOC that the value output by those is not a standard measurement comparable across machines? I.e. that the value is defined by the CPU used to run the code, and they are mainly useful for measuring the effect of local optimisations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per @nielsmh request :)
Typo in first commit message: "duble". |
@nielsmh: I think it is true for the chrono based measurement as well, that it is not a standard measurement, and depends on the CPU speed. As I do not see what the original tic and toc do, I need some help to phrase the difference if you want me to include it in the documentation. |
Chrono measurement should be in micro or milli seconds. That's the standard measurement referred to. RDTSC is in CPU cycles which doesn't translate to real time at all, just CPU workload. This is what he is getting at. |
Sorry: "duoble". |
Removing double underscores to be ANSI-C standard compliant.
Thanks for noticing! An imp must have nested in my commig-msg-hook, I will look into it. |
It is a copy of the existing
TIC
andTOC
functions, but the output is in microseconds.It might be less accurate than the CPU tic count, but it is easier to relate to the output.