Minima optimization, round four
Start from ea1bf9f5; its compiled control source is the qualified 17c8cec7.
The previous report
and evidence remain frozen. This round covers all 26 families through matched
operations, including families changed only by the shared engine. It does not
claim a separate algorithm improvement for every family.
Selected source is committed as 53f7b15f. Native screens and combined candidate
gates informed selection; all five exact-Main canister suites and native checks
passed. The dated report
owns final measurements, artifact identities, regressions and qualification limits.
Selected hypotheses
| Area | Change and preserved contract |
|---|---|
| Shared engine | Dispatch nonempty ranges within one block directly. An admitted directory entry proves the logical bound; cross-block requests retain full-range preflight before partial IO. Empty ranges, exact provider Root, raw-block owner generation, physical bounds and Drop remain checked. |
| Frozen hash map/set | Add get_many/contains_many, grouping primary buckets and then backup misses. Original output positions and duplicate decoding are preserved; partial completion on later read/decode errors is explicit. Scalar APIs remain available. |
| Count-Min | Read directly into initialized caller-owned u64 scratch using scoped byte views on compile-time little-endian targets. Keep source-page read granularity and global overflow preflight; join exactly adjacent write spans and report actual calls, pages and bytes. No undo journal. |
| HLL | Count full-node bytes into a 256-bin histogram, validating invalid bins after each page before reading another. Preserve corruption/error priority and the unchanged Ertl estimator. This is not manual loop unrolling. |
| Memento/Aeris | Decode fixed metadata and in-window slot values directly, retaining node-crossing fallback, byte encoding, rank/select order, padding/corruption checks and authorized mutations. |
| QSketch | Reuse a register's exact guard within a batch and recompute after an increase. Keep input order, immutable weights, rank/log expressions and intermediate increase counts. |
Private rooted ownership, exclusive 64 KiB blocks, aligned 4 KiB source nodes, fixed encodings and IC rollback are unchanged. Shared Store/SDK/Nyxus/Hylix implementations are outside this round's changes.
Rejected or deferred hypotheses
The SetSketch cutoff cache passed native equivalence checks and reduced rank evaluations in its source model, but its complete duplicate batch regressed. The OmniSketch conjunction change avoided repeated right-hand sample decoding, but its measured conjunction rows also regressed. Both were removed; their candidate results remain evidence, not selected-Main results. A math-call model or source simplification alone does not establish an IC improvement.
Provider sessions were deferred: reuse must justify the API and cannot extend a physical-memory loan across reentrant effects. Whole-block zeroing was deferred because wider scratch/source placement can outweigh fewer calls. Earlier manual-unroll and policy-bit experiments were not repeated.
Comparison and evidence scope
Existing scalar operations remain comparison lanes. New grouped fixture paths and builder verification use the same keys, payload assertions and logical results through bulk APIs. Some control branches accepted a grouped flag while executing scalar lookups; this is equivalent business work, not identical machine work. Preparation, sorting, output allocation, verification and drop belong inside the measured endpoint. Distant requests can still favor scalar access.
The supplemental query runner is bench/minima/batches.mjs. Pass canonical
--artifact /absolute/normal-artifacts, --pocket-ic /absolute/pocket-ic and
--out /absolute/new-results. It compares scalar and grouped calls at 32 and
256 keys over previously populated data, retaining exact results, complete
endpoint costs and three bounded profile pairs. It is read-only and does not
independently qualify KEEP or rollback.
Native reference, corruption, late-fault, byte-image and ownership tests screen
source safety. Actual instruction/page ledgers and KEEP/rollback gates establish
only their recorded artifacts and workloads. Local notes and receipts remain in
playground/minima-r4-20261022/results/; the final report and evidence manifest
define what is retained and replayable. The result catalog
keeps this round separate from historical controls and reports.