-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify and coroutinize main loop. This reduces the duplicated portion in the main loop which handles the 4 compile-time cases of {void returning, size_t returning} x {sync, async} test case methods. We duplicate only as much as need to keep the main loop efficient but try to share the remainder. We can also remove a lot of boilerplate which is no longer needed in C++. This fixes #2587 because the underlying bug there was a change in one of the duplicated sections but not the other. Performance should be similar after this change: any benchmark that does substantial work won't see a change. Very short benchmarks are sensitive to the work in the main loop and this is slightly better in some cases and slightly worse in others. This was evaluated with perf_tests_perf benchmark in this series. We delegate the choice of whether to yield in the benchmark not to the code under test (in the future returning case). Fixes #2587.
- Loading branch information
1 parent
6f6fc56
commit ff20df3
Showing
1 changed file
with
35 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters