Ashroot instruction profiling and optimization round

The round is complete: qualification and per-case results, profiled trials and rejected approaches, and the verified evidence packet. Prepared benchmark Wasm shrinks 6.8–14.0%; instruction wins and small regressions remain explicit per API. The original plan follows.

Baseline: newstack 3838f9ee184964c51a7607d42f6306a2e0b435a9, SDK 51f050bae1ea43114c95bd21010355bf67163220. This round follows the structural overhead qualification. The user requests isolated trials, deeper pocketic explain profiling, measured instruction improvements, smaller Wasm where that does not cost instructions, integration/commits and removal of unused experiment worktrees.

Trials and selection

  • Hylix: key-only ordered ranges, which currently decode discarded values.
  • Minima: discard removal after checked preflight, avoiding a second row decode.
  • Ashroot: planner/controller lookup, allocation and coordination costs.
  • Independent reviewer: IC source/accounting review, explain, bounded dynamic profiles, observer checks and source attribution.

Every trial has its own factory/SDK worktree, target and temporary directory. Research and safety proofs precede implementation. Preserve complete logical work, exact errors/bounds, private ownership, retirement and rollback. No stored node pointers, journals, background migrations or loans across await. New SDK primitives must preserve unrelated consumers and receive the relevant SDK and RRT/RRts regression qualification. Source-policy changes require supported upgrade admission evidence; unchanged bytes alone do not authorize a digest waiver.

Select by matched per-case instructions, completed work, page charges, cycles, capacity and artifact size. A size-only saving does not justify slower execution. Retain every regression and rejected alternative; do not weight unlike API cases into a synthetic aggregate. Rebuild strong direct controls when an SDK primitive changes their best available algorithm. Run the full maintained corpus on the selected combination, including actual upgrades and failure rollback.

Profiling contract

The pinned measured PocketIC binary remains SHA-256 6a9a75ad9b4551d2b0f4a0d954ffb8bd5bbd0ebc44ac00290679b06ad0b2f8e6. Its explain command describes the compiled charge/manual catalog. Actual hotspots come from bounded dynamic instruction captures, with matching profile off/on cases and full oracles. Do not call the catalog itself an execution profile.

Use the canonical builder's --debug-artifacts for optimized DWARF and body maps. Symbolization must match the installed bytes, origin map and archived sources. Existing qualified images lack these bundles; their dynamic function profiles remain useful, but cannot borrow another image's source-line information. Whole execution, included page fees and management/compilation debits remain separate. Unmapped/truncated/observer costs stay explicit. Reviewed IC source is research evidence, not asserted provenance of the measured server binary.

Keep raw results, failures, source snapshots and notes outside disposable worktrees. Verify their preservation before removing only inactive experiment worktrees; never remove unrelated servers, live state, leases or other work.