Conversation
Generated with Codex (https://openai.com/codex) Co-Authored-By: Codex <codex@openai.com>
Avoid constructing a RuntimeArray result when a simple scalar list assignment is evaluated in void context, while retaining the observable result path. Generated with Codex (https://openai.com/codex) Co-Authored-By: Codex <codex@openai.com>
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.
Summary
Avoid materializing the discarded
RuntimeArrayresult for the common simple-scalar list assignment path when the compiler knows the assignment is in void context. The observable-result path remains unchanged.This is deliberately a general argument-frame/result-allocation reduction, rather than a specialization for a particular method implementation.
Validation
/tmp/perl-void-list-assignment-20260919.log.makepassed for the exact measured source commit:/tmp/make-perf-void-list-assignment-measure-20260919.log.make check-linkspassed after the changelog entry:/tmp/check-links-perf-void-list-assignment-20260919.log.RuntimeArrayallocations from 318 to 117.Stack
This PR is intentionally based on #1439, and therefore includes the preceding unsigned-shift and foreach-alias work from #1438/#1439. Review the final commit independently; merge after its base PR is merged.