Repository navigation
Break greedy_by_start ties by input order, as omni does - #79
Merged
Merged
Conversation
order_by_start broke full (start, size) ties by str(id), while omni's start order, like every other greedy order, keeps input order. On tied inputs greedy_by_start could therefore beat omni, breaking omni's match with greedy_by_all on scalar input. greedy_by_start may now pack worse on such inputs; the point is parity with omni.
Adds a five-allocation instance on which the str(id) start order packed 8 against omni's 9.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
order_by_start broke full (start, size) ties by str(id) while omni's start order, like every other greedy order in C++ and Python, keeps input order, so on tied scalar inputs greedy_by_start could diverge from omni's start order, packing below it on some inputs (8 against 9 on the five-allocation instance in the new test) and above it on others, and break omni's match with greedy_by_all; dropping the key restores parity, and the #66 test that pinned id ties now pins input order. This is the scalar half of what #74 fixes by deleting the Python order copies; the vector lane-order divergence (C++ sorts clock lanes by a hash fingerprint, Python by their contents) is left to #74.