Skip to content

perf: avoid discarded simple list assignment results - #1440

Open
fglock wants to merge 2 commits into
perf/foreach-global-alias-20260919from
perf/void-list-assignment-20260919
Open

fglock wants to merge 2 commits into
perf/foreach-global-alias-20260919from
perf/void-list-assignment-20260919

Conversation

@fglock

@fglock fglock commented Sep 19, 2026

Copy link
Copy Markdown
Owner

Summary

Avoid materializing the discarded RuntimeArray result 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

  • New focused regression test passed on system Perl: /tmp/perl-void-list-assignment-20260919.log.
  • Full project make passed for the exact measured source commit: /tmp/make-perf-void-list-assignment-measure-20260919.log.
  • make check-links passed after the changelog entry: /tmp/check-links-perf-void-list-assignment-20260919.log.
  • Normal production-method screen used stable checksums and showed a 1.115x geometric-mean improvement versus adjacent baseline brackets.
  • JFR allocation sampling on that workload reduced sampled RuntimeArray allocations from 318 to 117.
  • A low-priority, production-condition full portfolio was protocol-compliant and stable. Against the clean parent portfolio, Closure improved 0.574 to 0.706x Perl, Method 0.152 to 0.157x, Numeric 0.265 to 0.302x, String 0.328 to 0.372x, Life 0.382 to 0.484x, and JSON 0.031 to 0.034x; Regex was effectively flat/slightly lower (0.511 to 0.505x). The portfolio remains below the project-wide 1.05x-Perl acceptance target, so this is qualified evidence rather than an acceptance claim.

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.

fglock and others added 2 commits September 19, 2026 10:05
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>
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