Skip to content

Break greedy_by_start ties by input order, as omni does - #79

Merged
fpedd merged 2 commits into
mainfrom
start-order-tiebreak
Oct 8, 2026
Merged

fpedd merged 2 commits into
mainfrom
start-order-tiebreak

Conversation

@fpedd

@fpedd fpedd commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

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.

fpedd added 2 commits October 8, 2026 13:23
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.
@fpedd
fpedd merged commit 8013035 into main Oct 8, 2026
13 checks passed
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.

1 participant