Structural overhead qualification
3 November 2026. The maintained bench
measures all 35 public runtime methods on Database, TableRead and
IndexView. Its finite corpus includes 231 cases: 2,388 supported measurements
and 33 explicit inapplicable cells across Nyxus, Hylix and Minima, each with
Ashroot, a split private direct implementation and a flat private direct
implementation. Native tests, replica rollback and single-upgrade migration
checks have separate roles; no native timing is presented as IC instructions.
Ordinary records use u64 IDs/scalars, Text<24> and relationship flags;
owning bodies have separate cases. Scale cases use 32 and 1,024 rows, with
smaller edge cases held at 32. These measurements do not establish behavior
at every population, row width or custom schema.
The result summary, complete case tables, CSV and compressed JSON report are published with their exact hashes. Baseline, first-candidate and final profiles each pass all 2,388 supported cells and retain 33 N/A cells. There are 3,980 distinct qualified supported measurements: the full baseline plus 796 new Ashroot measurements in each candidate. Each candidate reuses 1,592 supported direct control observations after checking 448 shared inputs and build settings; those observations are not new executions. The report audits 7,164 supported profile rows and attaches 450 native counter observations from 15 successful receipts.
What the comparison means
Three layers make inefficient shared primitives visible:
- The logical cost model derives necessary row and index changes independently from requests and before/after state. Four ordinary indexes require one primary installation and four index additions on insert. Identical replacement, per-step batch work and failing guards retain their distinct contracts; final state alone cannot price them.
- Prepared components measure primary work, individual sets, complete five-write composition, projections/validation, alternative unique representations and construction/read strategies. Complete compositions are measured together; isolated timings are never added. A same-image comparison checks exact input rows, ordered entries, candidate and artifact before comparing instructions.
- Independent direct implementations maintain the same complete integrity, ordering, error and ownership contract as the API. They use SDK collections, retained entries, bulk reset and safe consuming construction where available. They do not call the Ashroot planner or backend adapters.
The lower of two observed direct layouts is a pointwise reference, not a claim that one layout wins everywhere or that the SDK is theoretically optimal. Required validation, projections, constraints, ownership transport and layout can contribute to a measured gap. A negative gap is retained and explained.
Qualified source generations
| Generation | newstack source | Purpose |
|---|---|---|
| Original fixture | 4c49aaf1cc5514f4b70795616f1573dd93f0c92e |
Retained scouts/failures; not the qualified full baseline |
| Baseline | 8e856d22f647b704cea7a6e082edec0068244ddf |
Corrected independent controls and complete baseline |
| First candidate | 4ba4c932345d4038b120485a1dc5cb21e66ee0b8 |
Retained-entry edits, leaf removal and Minima slot preparation |
| Final candidate | 72007e094a36a0ac88c05134e178fe19bfc5466d |
Proven bulk table clear and shared Minima slot IO helpers |
Every generation uses SDK 51f050bae1ea43114c95bd21010355bf67163220.
Build matrices identify the actual frozen product source; runner host identities
are recorded separately. The current report tools may postdate those runtime
sources. Reference/flat measurements reused in candidate profiles retain their
original source, trace and artifact hashes and an explicit composition receipt;
they are not relabeled as fresh executions.
The original case corpus had SHA-256
52f8117508c2a4c2c98e9cd7d2cff99e6f48b11b3e25b31082927aa661baced5.
The qualified corpus enables prepared components in every image role, SHA-256
0cc2fc174be1c0650756bd61a393f9bc59573b59d697e9fe863f316aacc8d267.
Its native ordinary-case expansion is 737 engine/population scenarios, SHA-256
9ebfa96b0971571b4a5e9a59458284cb66fb72d465e9dc38d4f5b569f2df1ed9.
All original failures and diagnostic subsets remain evidence; subset success
never qualifies the complete matrix.
Implemented changes
Scalar native/Minima mutation retains the primary or directory entry while performing admissible preparation, removing repeated searches. A conservative unsafe backend capability defaults false; self-targeting relationships and Hylix retain preflight before mutation. Errors after mutation starts remain fatal. No saved node pointers, overlay or rollback journal were introduced. Custom leaf deletion-preparation failures now return their original ordinary preflight error; failures after index mutation still trap and quarantine native state. Focused tests cover this deliberate correction.
Removing a row with no incoming relationships uses a leaf path without graph staging. Minima checks slot headers for duplicate presence without decoding a value, retains its directory entry, and factors private slot IO outside caller-specific closures. Cached buffers are released before user factories and batch producers run, preserving access to shared providers. In particular, the final candidate fixes the first candidate's retained-buffer interference when a producer reads another database using the same resources.
clear_table uses existing primary/index bulk clears only when const schema
facts prove no incoming relationships and every index proves bulk equivalence.
Custom indexes default to the ordinary path. Exact existing admission budgets,
read/write gate precedence, owner retirement and fatal post-begin behavior are
preserved. There is no additional persistent schema state or runtime registry.
Final product tests pass 112 all-feature and 85 default-feature tests. They include owning retirement, custom deletion constraints/query history, exact budgets, incoming/self/outgoing relationships, native quarantine and shared-provider producer boundaries. SDK sources and the SDK gitlink are unchanged. RRT/RRts do not use Ashroot; this change does not claim a fresh RRT performance result. Prior core qualification remains separate evidence.
Measured improvements
Clearing the same 1,024-row four-index table, with complete final-state checks:
| Engine | Baseline executed instructions | Final executed instructions | Change | Best observed direct |
|---|---|---|---|---|
| Nyxus | 16,796,674 | 2,404,887 | -85.68% | 2,403,459 |
| Hylix | 123,174,475 | 9,388,889 | -92.38% | 9,142,110 |
| Minima | 18,933,090 | 2,140,840 | -88.69% | 2,139,510 |
Hylix's split private direct control costs 9,308,403. Its gap to final Ashroot is 80,486 instructions: 80,000 of additional included page charges and 486 other instructions. The cheaper flat layout has a different balance of page and execution costs. None of these residuals is labeled pure dispatch overhead.
For the original one-primary-plus-four-index insert example, the prepared five-write composition and the API run in the same compiled image, using matching before/after rows and ordered entries at population 1,024:
| Engine | Prepared composition | Ashroot insert | Gap | Additional included pages | Gap excluding included pages |
|---|---|---|---|---|---|
| Nyxus | 1,161,657 | 1,162,377 | +720 | 0 | +720 |
| Hylix | 2,205,603 | 2,448,565 | +242,962 | +240,000 | +2,962 |
| Minima | 1,162,224 | 1,162,990 | +766 | 0 | +766 |
These are finished instruction amounts; the page column is already included in the gap. Components omit some integrity work, report entry changes rather than row insertions and use their own private collection layout. Their gaps include that bookkeeping/layout difference. Complete integrity references and all shorter API/frame intervals remain separately available in the full report.
The first candidate's clear-table regressions (+1.12% Nyxus and +4.35% Minima
at 1,024) are preserved rather than hidden behind the final result. Final
Minima batch100 cases start with 32 rows: insert-many100 improves from 3,204,001 to 3,048,003 instructions (-4.87%);
replace-many100 improves from 3,262,795 to 3,226,654 (-1.11%). Its helper factoring
adds 60 instructions to scalar four-index insert versus the first candidate,
and clear_all adds 940 instructions (+0.043% at 1,024), while shrinking code.
The complete comparison must be used for other cases; these are selected
matched examples, not an all-API percentage.
The largest executed-instruction increases versus baseline in the measured
final corpus are Nyxus clear-all-empty (+976, +0.228%), Hylix clear-all
(+504, +0.0425%) and Minima relationship-cycle-diamond (+2,479, +0.358%).
Minima's largest migration execution increase is +110,112 (+0.0519%) for
final-FK validation at 1,024. Upgrade management debits remain a separate
comparison. These small regressions are accepted alongside the measured
clear/search/batch benefits and smaller images; the case tables retain all
positive and negative deltas.
All 796 final Ashroot points retain the same heap and stable capacity as their matched baseline. Their total accounted-memory differences equal the smaller installed binaries. Independent Candid decoding checked 7,960 saved before/after snapshots from the 3,980 distinct qualified points: 79,600 memory-field comparisons agree with the original status bytes. These are capacity/accounting checks, not peak or live-allocation measurements.
Fixture footprint
All six final Ashroot images are smaller than their baseline counterparts. These large fixtures compile many API/schema instantiations; the changes below do not predict an individual application's size or isolate the contributions of bulk clearing and slot-helper factoring. Full canonical receipts are in artifact-summary.json.
| Engine | Image | Baseline Code bytes | Final Code bytes | Change | Gzip6 change |
|---|---|---|---|---|---|
| nyxus | v1 | 2,350,569 | 1,972,529 | -16.08% | -99,612 bytes |
| nyxus | v2 | 2,396,895 | 2,071,655 | -13.57% | -93,047 bytes |
| hylix | v1 | 2,509,671 | 2,203,543 | -12.20% | -70,573 bytes |
| hylix | v2 | 2,601,978 | 2,345,484 | -9.86% | -63,637 bytes |
| minima | v1 | 2,080,052 | 1,858,044 | -10.67% | -31,073 bytes |
| minima | v2 | 2,492,631 | 2,181,101 | -12.50% | -87,148 bytes |
Remaining gaps and control tradeoffs
- Hylix key iteration still decodes values through the SDK iterator. The native counter exposes 100 value decodes for a 100-key scan where the logical floor requires zero. This is a primitive gap, not hidden in a zero wrapper-tax claim. Its public map also has no retained prepared-entry continuation; the controls use the available safe APIs rather than inventing unsafe node tokens to claim a one-search lower bound.
- Minima removal currently returns a decoded value; after preflight this can decode twice. A discard-removal primitive remains a possible SDK improvement.
- Compatible direct migrations can reuse an index owner; an opaque Ashroot row conversion may safely rebuild it. That algorithm difference can dominate the gap. It is not generic dispatch overhead.
- The Hylix direct scan moves inline decoded values through iterator adapters; Ashroot callback lending can be cheaper. Its direct scalar write loan also favors success over refusal: refusal can publish unchanged state, while Ashroot preflights first. Both costs are shown; neither path is called a universal optimum.
- Direct Minima reacquires a buffer per primitive; Ashroot caches it within its context. Relationship controls can perform a presence check followed by an entry search. Flat and split owners also retire removed modules differently.
- There is no complete prepared primary-plus-one-set control. The complete one-index API still has both independent direct controls. The report marks this component composition unavailable instead of adding isolated timings.
Native counters cover comparisons, codecs, validation, projections, factories and body bytes. They do not count every provider/header or allocator action; uninstrumented retirement is N/A. Ownership tests and IC page traces supply different evidence. Further optimization should target measured gaps while preserving these distinctions.
Accounting boundaries
Finished replicated instructions already include page charges. The report's
instructionsExcludingPages removes only the same finished trace's page debit;
it retains other execution/system charges and is not pure CPU work. Whole-call
page debits cannot be subtracted from shorter API/frame counter intervals.
Heap and stable trace ranges are separate 64 KiB regions; summed execution
coverage and per-module unions remain distinct.
Upgrade Wasm and management compilation debits are shown separately and reconciled once with actual prepayment/refund and cycle receipts. Cold and warm compilation charges differ; combined totals are not a migration-scaling claim. Every migration is one continuous upgrade using DTS, with no background messages or access-denial migration mode. Measured runtime configuration uses 40 billion ordinary/300 billion install instructions and 2 billion per slice.
The owned local PocketIC 16.1.0 binary has SHA-256
6a9a75ad9b4551d2b0f4a0d954ffb8bd5bbd0ebc44ac00290679b06ad0b2f8e6.
The separately reviewed dirty IC checkout is source research, not asserted
binary provenance; exact paths and hashes are in the bench README. Raw traces,
cycles, state/oracle files, complete source closures and artifacts are retained.
Local wall time is diagnostic; memory figures describe capacity/accounting,
and deterministic gzip and Code bytes describe artifact size rather than
installed-module billing or live memory.
The evidence bundle preserves raw traces, original receipts, failed/scout attempts, source archives, native checks and independent reviews. Scoped documentation, research navigation and whitespace checks pass. The global documentation checker retains 16 preexisting missing crypto benchmark targets, unrelated to this change.