Parent: #459 Depends on: #460, #461, #462
Goal
Reduce context/realm cold-start and teardown latency through owned immutable bootstrap artifacts and bounded reusable infrastructure, without hiding work outside the cold timing boundary or leaking state across realms.
Scope
- Attribute allocator setup, global/builtin installation, shapes/atoms/strings, parser/compiler work, module registries, GC heap initialization, JIT owner/code pages, inspector/debugger tables, and teardown/finalization.
- Share only immutable process/VM artifacts: generated tables, builtin source/bytecode/native templates, canonical atoms/shapes, and read-only metadata with explicit version/feature/options keys.
- Add copy-on-write or per-realm mutable state where identity/prototype mutation requires isolation.
- Reuse bounded allocator/code-page/scratch infrastructure only when it is outside context ownership by public design and included symmetrically in the documented benchmark model.
- Make teardown proportional to owned live resources rather than historical capacity.
No-workaround rules
- No hidden pre-created Context, unbounded realm pool, skipped builtin initialization, shared mutable globals/prototypes, delayed finalizers outside the timed lifecycle, or benchmark runner warmup in cold mode.
Acceptance
- #460 cold rows include empty/minimal/full-feature contexts, source/module setup, first evaluation, destruction, peak RSS, retained process RSS, and finalizer counts.
- Shared immutable artifacts have mutation-isolation, sibling-realm, GC lifetime, invalidation, thread-safety, and teardown tests.
- Every cold-lifecycle speedup has exact-parent phase/RSS evidence and no warm steady-state regression.
- Repeated create/destroy soak returns to a bounded process-memory plateau with all callbacks/finalizers exactly once.
- Current #44 cold wins remain green.
Foundation
The current benchmark's process-wide thread-safe allocator model and timed cold boundary are documented in docs/benchmarks.md; lifecycle improvements must preserve that contract.