Exact Minima graphs — layout selection and scratch refinements

This study compares three mutable layouts and frozen CSR/CSC under one exact labelled, weighted, directed-edge contract. Inputs and full logical replies match independent oracles. Read the graph guide for current APIs and the experiment for papers, failed attempts, qualification and publication evidence. The separate Nyxus report measures different datasets and native reduction work; its totals are not a direct graph-engine comparison.

Measured instruction changes

Negative changes mean fewer complete replicated instructions, including entry, Wire, scratch, reply and page charges. Each operation row averages 32 fresh physical updates after warming. Mixed steps retain both their mutation and read executions. Population happened in earlier calls; no no-op charge is subtracted.

Layout and artifact Normal operation rows Changes versus its original baseline Population changes
PackedGraph, refined d41a4128 70 All cheaper: −0.04% to −2.31% All cheaper: −16.60% to −21.54%
PagedGraph, e37d3073 70 All cheaper: −0.13% to −8.81% All cheaper: −24.58% to −32.17%
DeltaGraph, refined d41a4128 70 All cheaper: −0.34% to −14.15% All cheaper: −21.86% to −27.82%
FrozenGraph, e37d3073 65 10 cheaper, 21 equal, 34 costlier; −0.33% to +0.62% Unchanged

Normal datasets have 512 vertices: sparse, skewed, dense-ish, disconnected and cyclic. The focused screen has 8,192 vertices, sparse/skewed shapes and the same 32-sample protocol:

Refined layout Large-screen rows Changes versus the same baseline artifact
PackedGraph 28 All cheaper: −0.04% to −2.29%
DeltaGraph 28 All cheaper: −0.28% to −9.15%

The baseline artifact is f9ac974a. Paged/CSR costs above belong to the qualified e37d3073 binary; refined Packed/Delta costs belong to d41a4128. Paged/CSR source is unchanged in the final combined implementation, but that does not make these measurements fresh costs of its whole binary. Exact module, protocol and source identities accompany the result files.

Detailed ledgers: selected operation costs, initial normal comparison, refined normal comparison, large comparison, and machine-readable selection. Population, memory, constructor, mixed-step and profile ledgers sit beside each operations CSV.

What was retained

PagedGraph is the strongest initial mutable choice in this small normal matrix: it is cheapest in 56 of 70 sampled mutable operation/shape domains, versus 12 for DeltaGraph and two for PackedGraph. It combines inline degree-one adjacency, shared slabs and trees for hubs. PackedGraph provides a global B+tree ordering and a sorted bulk builder. DeltaGraph provides bounded base/change segments with local consolidation and a different locality tradeoff. Frozen CSR/CSC is the immutable, compact reference. These are deliberate alternatives, not an automatic layout policy or a universal ranking.

PackedGraph now constructs mutation paths only for mutations. Its fence cache, suffix writes and bulk construction remain; reads carry no unused mutation frames. DeltaGraph uses compact initialized-prefix paths and borrowed scratch. A rejected large decoded-path cache reduced provider reads but added exactly 8,984 bulk-copy instructions in a profiled sparse scan; some intersections also gained 160k heap fees. Its sparse population initially regressed 79%. The smaller refinement reversed those regressions. PagedGraph removes read-path construction and patches inline weights directly. CSR avoids unfiltered lookahead reads when array bounds already prove whether another edge exists; its small measured regressions remain in the table above.

Memory and preparation

All these normal cases maintain the exact reverse index. Owner reservations were unchanged by the optimizations. The table counts live 64 KiB payload blocks, not live bytes, stable capacity, retained directory bytes or host RSS.

Shape Edges Frozen Packed Paged Delta
Sparse 530 1 1 1 9
Skewed 1,702 2 3 3 10
Dense-ish 16,426 9 24 11 18
Disconnected 1,021 1 2 2 9
Cyclic 663 1 1 1 9

Population includes construction, sorting where applicable, allocation, writes and reverse maintenance. BFS constructors are reported separately from bounded resume steps. The normal fixture's Wasm capacity was 16,842,752 bytes; capacity is not live graph allocation. See the CSV ledgers for complete population and memory fields, physical-call costs and provider diagnostics.

Qualification and limits

The original and first optimized full normal runs each passed 275 operation rows, 165 lifecycle assertions and 40 bounded profiles. Refined normal passed 140 rows, 90 lifecycle assertions and 20 profiles. Actual lifecycle checks include populated KEEP, retained BFS through KEEP, logical mutation invalidation, rollback, contract rejection, growth, drop and reuse. The final artifact also passed the 57-call maximum-endpoint smoke across all mutable layouts.

The final large pair passed 56 operation rows under the identical explicit bounded-performance-screen-v1 host protocol. It intentionally has zero lifecycle assertions and profiles. Three earlier long focused attempts were stopped and marked superseded, with their partial output preserved. They are not full passes. BFS rows measure 32 bounded progress updates, not a complete large search or a worst-case instruction bound. Heap fees, body counters, provider bytes and remaining charges stay distinct; remaining charges are not automatically pure computation.

Final native working-context coverage is 440 passing tests with one ignored: 433 were rerun for the refinement and seven unchanged Nyxus checks were reused. That separate check preserves the 47 unrelated SDK working edits; it does not qualify their IC performance. Their raw uncommitted source stays local.

PocketIC is pinned to SHA-256 360cc26cccf9d90d38070ed8d7104f4b4a2ca4e586b197af6f1cdd47e9c9fd67. The source-policy freshness investigation, bounded Wire admission fixes, compiled physical checks, rejected variants and omitted-raw-evidence manifest remain in the experiment record. The selected publication packet excludes cached servers and includes only representative raw profiles; complete result ledgers are kept.