Persistent Map insertion profiling

Run the focused, parallel profiling matrix from the repository root:

bash research/experiments/map-insert-profile/run.sh

The experiment uses the repository's pinned compiler, existing bench/target, wasm64 tool, and PocketIC 16 server. It builds six Wasms and runs six independent PocketIC instances concurrently: retained/stable placement crossed with uninstrumented control, nested phase profiling, and detailed backend tracing. Every measured request restores the same saved 100,000-entry Map. Population, full baseline verification, leaf-shape selection, and postcondition checks are outside timing. Temporary server state is deleted after identity-checked cleanup.

The control and phase variants run 54 cases with three trials each. The trace variants run the 47 single-operation/control cases once. Large trace vectors can exceed the SDK's reply envelope; batches remain measured in both paired variants and are explicitly outside the detailed trace matrix. This yields 742 verified samples, with flat instruction and phase CSV files, raw JSON, memory metrics, source/artifact provenance, ordered memory traces, and a summary in a new research/artifacts/*-map-insert-profile directory.

Cases include empty scope, module field acquisition, Map length, eight lookup and insertion positions, read-warmed variants, neighboring/scattered/append batches, and a single insertion selected from an actually full leaf versus a non-full leaf. A read-only diagnostic chooses those leaves; observed split spans confirm the chosen paths. Keys are spaced, full-width u64s, populated with the archived benchmark's deterministic shuffle. Values are ordinal(key).

Application structure remains ordinary: an opaque module handle is attached to the root; its service owns its Map and uses generated memory accessors. Diagnostic span collection and the read-only shape helper exist only in the copied sources under this experiment. Production Store, Collections, SDK, and their benchmarks are unchanged. The copy's source basis is recorded in base-source-sha256.json.

Read instrumentation semantics and backend trace semantics before interpreting the data. Gross profiled phase intervals contain observer overhead and IC charging; they are not uninstrumented CPU time. Operation-only exclusive totals reconcile exactly with the instrumented Operation span. Whole-body phases include scope setup and finalization. An explicit same-call read warmup precedes timing and capture of the operation, so its cost is reported separately, not hidden as free work.

The diagnostic reply/stack layout also affects the body outside the operation. Use the paired control to expose that cost; do not relabel it as the canonical application's root-scope cost. The existing full benchmark remains the reference for its original body measurement. Detailed analysis is in the profiling report.