You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR reduces runtime allocations related to list variable element position lookups by switching hot-path code from ElementPosition materialization to direct inverse lookups, and adds regression tests to ensure consistency between these APIs.
Changes:
Replace getElementPosition(... ) instanceof PositionInList usage with getInverseSingleton(...) in FilteringValueRangeSelector to avoid allocating PositionInList.
Simplify pinned-element filtering in ListChangeMoveSelector by delegating to ListVariableState.isPinned(...) (avoids per-candidate ElementPosition allocation).
Add tests verifying getInverseSingleton(...) and getElementPosition(...) stay consistent, including when inverse is externalized.
When shouldUnassignElements is false (first initialization with expectShadowVariablesInCorrectState() true), unassignedValueSet is still allocated at initialUnassignedCount capacity even though it is never used, which is avoidable overhead on a performance-sensitive path.
The review comments have been accepted and resolved.
In order to not let this PR stay open any longer, and considering this PR has another approving review already, I will merge as is.
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🔵 Needs a closer look
The updated Javadoc example in FilteringValueRangeSelector uses invalid HTML tag nesting that should be corrected to avoid doclint/Javadoc rendering issues.
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🔵 Needs a closer look
It changes core list-variable shadow initialization/reset semantics and selection behavior on performance-sensitive paths, warranting final human review.
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
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.
No description provided.