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
Repeated Perl concat-assignment (for example, building a parser token one character at a time with .=) currently risks copying the complete Java String prefix on every append. This produces quadratic time and can turn ordinary multi-megabyte inputs into apparent hangs.
The immediate Selenium::Remote::Driver regression provides a concrete example: JSON::PP decodes a 3.4 MB mocked response with an escaped body using repeated scalar appends.
Investigate a runtime-level amortized representation for ordinary growing string scalars, with materialization at observable boundaries. Preserve Perl behavior for aliases, UTF-8 versus byte-string flags, tied and overloaded scalars, scalar magic/watchers, serialization, and both JVM and interpreter backends.
Acceptance criteria:
Repeated .= growth is linear or amortized-linear for plain strings.
Existing scalar semantics remain unchanged at read, assignment, and interop boundaries.
Include focused performance/regression coverage and benchmarks for parser-style large inputs.
State: active
Agent/session: Codex / combined performance fixes 2026-11-09
Scope: #1298 repeated scalar .=; reproduce/profile parser-style growth and preserve scalar semantics.
Work: fix/anchored-regex-and-scalar-concat, source 54f02716b; PR #2002 open against master.
Checkpoint: 2026-11-09. Async-profiler captured 1,488 samples through StringOperators.stringConcat and String.charAt during literal appends. The fast path rejected RuntimeScalarReadOnly string literals. StringOperators now permits that immutable RHS type while retaining the existing overload, tied-scalar, bytes and mutable-target guards. PR #1938 modifies RuntimeScalar but not this operator path; the fix leaves scalar ownership code untouched.
Evidence: extended capture, converted to collapsed CPU samples. The 3.4M single-character workload changed from timing out at 240s on the parent to 0.878s on the candidate JVM and 1.722s on interpreter. The new literal-append unit checks pass system Perl and both backends. Full make and make check-links passed.
Blocked by: none.
Next: monitor PR #2002 CI and review.
Activity
fglock commentedon Nov 9, 2026
State: active
Agent/session: Codex / combined performance fixes 2026-11-09
Scope: #1298 repeated scalar
.=; reproduce/profile parser-style growth and preserve scalar semantics.Work:
fix/anchored-regex-and-scalar-concat, source54f02716b; PR #2002 open against master.Checkpoint: 2026-11-09. Async-profiler captured 1,488 samples through
StringOperators.stringConcatandString.charAtduring literal appends. The fast path rejectedRuntimeScalarReadOnlystring literals.StringOperatorsnow permits that immutable RHS type while retaining the existing overload, tied-scalar, bytes and mutable-target guards. PR #1938 modifiesRuntimeScalarbut not this operator path; the fix leaves scalar ownership code untouched.Evidence: extended capture, converted to collapsed CPU samples. The 3.4M single-character workload changed from timing out at 240s on the parent to 0.878s on the candidate JVM and 1.722s on interpreter. The new literal-append unit checks pass system Perl and both backends. Full
makeandmake check-linkspassed.Blocked by: none.
Next: monitor PR #2002 CI and review.