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

Benchmark updates #3

Merged
merged 6 commits into from
Apr 5, 2022
Merged

Benchmark updates #3

merged 6 commits into from
Apr 5, 2022

Conversation

petervdonovan
Copy link
Contributor

This is another round of small adjustments to the benchmarks. This PR is submitted now at @cmnrd's suggestion to address #1058.

This prevents get_physical_time from being invoked in the wait_until function in reactor_threaded.c. The overhead of that call to get_physical_time appears to be as much as 10% of total cycles in benchmarks like PingPong whose execution times are dominated by runtime overhead.
At Berkeley, CS61C students are taught not to declare counters in "for" loops because it used to be UB/forbidden in older versions of C. The best solution to this is probably not to use a global variable (!!!!!!!) as a counter (!!!!!), especially in a program with parallelism.

This change also gives the program a more explicit error message if the output is incorrect.
I take full responsibility for this one. When I changed the way output was parsed, print statements that lacked terminating newlines interfered with the timing reports.
Copy link
Contributor

@cmnrd cmnrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks!

@cmnrd cmnrd merged commit 69d8758 into main Apr 5, 2022
@cmnrd cmnrd deleted the benchmark-updates branch April 5, 2022 08:41
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

Successfully merging this pull request may close these issues.

2 participants