Fine-tune unified scheduler loops by select_biased #1437
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
unified scheduler is pretending to use the biased selection for its optimum performance.
Summary of Changes
Now that
select_biased!
is available (#1434 ); let's use that.perf numbers
about 12%-13% increase can be attained in an ideal condition with a caveat:
before
after
Here's the caveat: unlike previous optimization prs (#627, #1037, #1192 (comment), #1197 (comment) and #1250 (comment) <= this is not merged yet), note that the perf gain is small in the present day of the real word, to be honest. I was actually forced to compromise here. ;) The above benchmark is conducted with the synthesized settings of both busy looping and nop handler like this:
So, this explains the exceeding time reduction compared to previous results.
However, I believe the above result will still stands by itself and this pr can be justified. That's because:
execute_batch
is toooo slow. both will be addressed in the future.