Rather a question about accuracy achieved by using physical time in benchmarks #1017
Replies: 2 comments
-
I'm gonna start with converting this to a Q&A Discussion, as it's not an issue in the context of this project. I'll follow-up with an answer to the question there. |
Beta Was this translation helpful? Give feedback.
-
I think you're addressing this question towards a particular solution or contributor, almost certainly in the C++ space? If so, it would help if you can indicate what solution/contributor it concerns. As a general statement, different languages offer different provisions for measuring time, with different accuracies. We've accepted as a project premise that not all timing approaches are created equal. In the context of this being a drag race, what matters in the end is that the ranking of languages in the two leaderboards (single-threaded and multithreaded) is correct, and thus not invalidated due to (wildly) invalid time keeping. As far as I can tell, that has not happened yet. The exact number of (micro)seconds spent on a run is actually far less important, again as long as the ranking of languages is correct. I hope this helps? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
As long as
std::chrono::steady_clock
counts physical time how did you guarantee accurate measurement of the actual (thread) time of your tests? Seemingly POSIXclock_gettime(CLOCK_THREAD_CPUTIME_ID, ...)
could be more correct here.Beta Was this translation helpful? Give feedback.
All reactions