Skip to content
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

Comparision to other methods #4

Open
onurtore opened this issue Jan 29, 2023 · 1 comment
Open

Comparision to other methods #4

onurtore opened this issue Jan 29, 2023 · 1 comment

Comments

@onurtore
Copy link

Hi!
The last time I was measuring code in cpp I was using Chrono Steady Clock. I was wondering whether approach in this repository has higher accuracy?

@alexnavtt
Copy link
Collaborator

Sorry, I missed this question. Internally, this library uses chrono steady clock, but it has some additional logic to organize the data which will lose some slight accuracy. I've taken as many steps as possible to try to minimize this effect (the actual data processing happens in a separate thread) but the more semantics you put into timing the more accuracy you lose. On my computer, a chrono call takes on the order of 50ns and a timer tic toc sequence is around 300ns. That being said, I've found this method to be extremely useful for identifying bottlenecks and optimization targets in code without a whole lot of effort

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants