Demonstrate merge effort proportionality #409
Closed
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.
This PR demonstrates how one might effect "proportionality" in idle merge effort. The method
reduced
is use to indicate whether there is more work to do, and whether idle merging should re-schedule the arrangement operator. This PR changes the logic from "if any work at all exists" to "if any work exists between proportionally sized batches". This is not meant to be a perfect rule, nor a perfect constant, but a starting point to experiment with a reduction in CPU use when there is not a substantial amount of work to do.There is a further reduction one could make to only look for proportionality between the largest non-empty batch and those below it, which would defer work until there was at least some proportional reduction in the total size of the arrangement, rather than among intermediate batches.
@antiguru @teskje