Skip to content

perf(llvm): reduce native module construction allocations - #379

Merged
julia-script merged 3 commits into
mainfrom
julia/jul-154-cut-typescript-llvm-construction-time-for-medium-native
Sep 7, 2026
Merged

perf(llvm): reduce native module construction allocations#379
julia-script merged 3 commits into
mainfrom
julia/jul-154-cut-typescript-llvm-construction-time-for-medium-native

Conversation

@julia-script

@julia-script julia-script commented Sep 7, 2026

Copy link
Copy Markdown
Owner

LLVM module construction allocated intermediate Effect/Result values and cloned instruction containers for each emitted instruction. This change reduces those allocations in the construction loop while retaining typed failures, ownership checks, atomic body commits, and scoped resource cleanup.

  • Consolidate instruction access and mutation into synchronous typed transitions behind the effectful API.
  • Avoid Result generator allocations and redundant instruction-container copies.
  • Allocate forward-reference cycle tracking only when traversing forward operands.
  • Cover unresolved and cyclic unused forward chains, including successful retry after reservation cleanup.

Public APIs and compiler semantics are unchanged.

Validation: focused LLVM and compiler tests, parity validation, pnpm typecheck, pnpm format:check, pnpm lint, pnpm test, pnpm check, and pnpm release:candidate passed for the implementation. Benchmark tooling, fixtures, and artifacts are excluded from this PR.

Fixes JUL-154.

@vercel

vercel Bot commented Sep 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
silk-effect-docs Ready Ready Preview Sep 7, 2026 3:25pm UTC

Request Review

@julia-script julia-script changed the title perf(llvm): cut native module construction time by over 40% perf(llvm): reduce native module construction allocations Sep 7, 2026
@julia-script
julia-script merged commit 2c2b7c1 into main Sep 7, 2026
27 of 28 checks passed
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