Skip to content

perf: retain integer Array loops and avoid short-string buffers - #100

Merged
dirkdev98 merged 2 commits into
mainfrom
perf/benchmark-worktree-20261108
Nov 8, 2026
Merged

dirkdev98 merged 2 commits into
mainfrom
perf/benchmark-worktree-20261108

Conversation

@dirkdev98

@dirkdev98 dirkdev98 commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

Numeric Array loops repeatedly box integer state, while short concatenation chains allocate append buffers before they need them. Keep checked integer locals across Array iterations with a floating fallback, and start shared string buffers only after the rope chain continues.

  • Admit dynamic integer inputs with runtime guards, preserve full safe-integer loaded values, and publish completed iterations before polling. The native counter verifies that the integer body executes.
  • Avoid backing buffers for two-step concatenation without delaying small repeated appends. Extend the string fixture to cover widening after buffer admission and include it in sanitizer coverage.
  • Seven matched AC pairs reduce am3 from 1128 ms to 1029 ms, an 8.8% paired reduction. Seven separate fixed-work Splay pairs reduce 239 ms to 178 ms, a 25.3% paired reduction. Small-append startup stays near baseline; the largest string-control slowdown is 1.6% on concatenation. These are narrow workload claims. Three final V8 pairs improve Splay from 9647 to 11555 (+19.8%); total 6644 to 6782. All eight sub-scores and internal checks pass; non-target changes range -2.3% to +2.1%.

Validation: 264 focused compiler checks, targeted UBSan native/backend/GC-stress coverage, string append parity under UBSan and GC stress, type-check and lint pass. Every canonical CI lane passed on preceding checkpoint 26d53d2; this head needs its own CI result. Benchmark baselines remain unchanged.

- Guard actual Array loop inputs and admit boxed int32 payloads directly.
- Resume Number bodies from saved state without replaying committed stores.
- Retain mask and signed-shift bounds for multiplication and cover BigInt fallbacks.
- Validate focused compiler/native checks and seven matched am3 pairs.
- Require another rope link before starting a shared append buffer.
- Preserve small-append startup and exercise widening after buffer admission.
- Verify UBSan parity and GC stress, type-check and lint; seven matched Splay pairs improve 25.3%.
@dirkdev98 dirkdev98 changed the title perf(compiler): retain checked integer state in Array loops perf: retain integer Array loops and avoid short-string buffers Nov 8, 2026
@dirkdev98
dirkdev98 merged commit c6066e2 into main Nov 8, 2026
12 checks passed
@dirkdev98
dirkdev98 deleted the perf/benchmark-worktree-20261108 branch November 8, 2026 16:57
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