Skip to content

perf(jit): short function hot loop inline#6

Merged
fffonion merged 26 commits into
masterfrom
plan/jit-short-function-hot-loop-inline
Jul 20, 2026
Merged

perf(jit): short function hot loop inline#6
fffonion merged 26 commits into
masterfrom
plan/jit-short-function-hot-loop-inline

Conversation

@fffonion

@fffonion fffonion commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add exact native trace exits, hot side-trace fusion, sparse region state, and direct tail-link handoff across same-frame and callable-frame traces
  • carry inherited state across native links and rebuild linked trace entries directly from the restored active VM frame, removing redundant packet pointer traffic
  • profile script call targets and inline bounded static leaf functions into SSA traces, including virtual-frame deoptimization and region SSA remapping
  • lower hot scalar host calls and selected allocation, UTF-8, regex, and string operations through native helpers
  • reduce callable-frame, interpreter dispatch, trace-exit, sparse restoration, and owned-value replacement overhead
  • invalidate native trace owners and incoming links when set_local mutates callable identity
  • require callable prototype proof for root, exit, and continuation trace inlining, while preserving runtime identity and schema guards
  • explicitly track shared Borrow/BorrowMut source slots, including captures created by nested callables, and suppress native entry/inherited handoff only for affected frames while retaining native execution for private copied captures
  • harden direct-link publication, interruption restoration, ownership/drop ordering, and link-generation invalidation
  • reconstruct virtual inline frames for instruction/helper failures, preserve aliased mutation inputs, and enforce callable map-key parity
  • validate complete inline-relevant callable state and keep synthetic schema guards out of fuel/epoch instruction accounting
  • add JIT region/link/inline telemetry plus focused correctness and performance coverage

RustData sort performance

Criterion A/B against pd-vm 0.23.1, pinned to CPU 11; lower is better.

Mode 0.23.1 PR Independent median delta Paired median delta
JIT, latest 10-pair rerun 161.755 ms 153.165 ms -5.31% -5.31%
Interpreter, 5-pair extended rerun 257.260 ms 263.420 ms +2.39% -3.14%

Both modes meet the target by independent and paired medians. Absolute timings show host variance, so aggregate and paired medians are reported together.

Verification

  • workspace tests with all features
  • strict workspace Clippy with warnings denied
  • AArch64 workspace check and Clippy
  • focused ownership, deoptimization, callable identity/schema, shared-capture, region, direct-link, and invalidation tests
  • all GitHub Actions checks on the latest HEAD

Three independent targeted read-only reviews approved the final HEAD 2267fa2 with no BLOCKING/HIGH findings.

@fffonion
fffonion force-pushed the plan/jit-short-function-hot-loop-inline branch from b6e69b8 to 9c0f376 Compare July 19, 2026 22:17
@fffonion
fffonion force-pushed the plan/jit-short-function-hot-loop-inline branch 2 times, most recently from 1640c0a to eea63c7 Compare July 20, 2026 11:48
@fffonion
fffonion force-pushed the plan/jit-short-function-hot-loop-inline branch from eea63c7 to 2267fa2 Compare July 20, 2026 12:10
@fffonion
fffonion merged commit fd3ddc9 into master Jul 20, 2026
12 checks passed
@fffonion
fffonion deleted the plan/jit-short-function-hot-loop-inline branch July 21, 2026 07:00
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