Minima optimization, round four — 22 October 2026

Selected source 53f7b15f is compared with the previous qualified compiled source 17c8cec7 (starting Main ea1bf9f5 has identical measured inputs). Controls are reused by exact artifact, source and workload identity. These are mean complete replicated endpoint instructions: page charges, request/reply, preparation, sorting, verification and cleanup are included. There is no no-op subtraction.

Exact existing-function data, every existing case, new query cases, selection/rejections, and evidence.

The existing matrix has 378 cases across all 26 families: 322 lower, 24 equal and 32 higher endpoint means. This includes 43 controls. A separate 48-case query lane adds 100,000-key frozen-map/set workloads at batch sizes 32 and 256: 30 lower and 18 higher. Each case uses 32 fresh calls after an unmeasured warmup. Persistent fixture population happens in earlier calls; temporary-builder input generation, population, verification and destruction remain measured. The 426 cases contain 13,632 measured executions and 13,600 saved business replies, excluding no-op replies.

Representative existing operations

Frozen builders include construction, verification of every original key/value and destruction. Six hash map/set builder cases use the new reusable bulk API for equivalent work; their gains are not isolated construction-algorithm speedups.

Complete operation Before instructions Selected instructions Change Heap-page fee delta
frozen-map-build-verify-drop-8192 50,320,326.25 18,085,980.375 -64.058% 0
frozen-set-build-verify-drop-8192 48,799,855 15,849,260.969 -67.522% 0
hll-p12-estimate 869,962 829,489 -4.652% 0
hll-p14-estimate 1,241,403 1,105,465 -10.950% 0
hll-p16-estimate 2,739,040 2,209,320 -19.340% 0
count-min-merge 1,924,210 1,784,020 -7.286% 0
countmin-build-sparsemerge-verify-drop-512 3,931,151.875 3,432,175.094 -12.693% 0
memento-range-32 2,124,782.5 1,541,702.094 -27.442% 0
aeris-range-32 2,105,850.125 1,578,732.031 -25.031% 0
qsketch-duplicate-32 3,818,670.562 3,562,669.562 -6.704% 0

New grouped query measurements

Both artifacts receive identical keys, order, missing-key patterns and expected values. The old artifact uses its scalar fallback when the grouping flag is set. The selected artifact calls get_many/contains_many; the sorted-map API already existed. Sorting, allocation, hashing and result-order restoration are charged inside the endpoint. Scalar alternatives remain measured.

Complete query Old scalar fallback Selected grouped API Change
frozen-hash-repeat-256-grouped 2,168,150.375 1,008,773.875 -53.473%
frozen-hash-distant-256-grouped 3,994,811 1,937,871.344 -51.490%
frozen-hash-set-repeat-256-grouped 2,164,153.375 997,359.375 -53.915%
frozen-sorted-repeat-256-grouped 4,597,208.375 992,248.75 -78.416%
frozen-sorted-neighbor-256-grouped 4,607,518.781 1,072,325.875 -76.727%
frozen-sorted-distant-32-grouped 1,350,420.25 1,371,156.969 +1.536%
frozen-sorted-missing-32-grouped 1,350,813.312 1,371,387.594 +1.523%

Grouping is optional. The two 32-key distant/missing sorted batches regress by roughly 1.5%: their limited source-node reuse does not repay preparation/sorting. Scalar query/control endpoints also have small positive instruction deltas from the changed compiled dispatch, recorded in full rather than rounded away. These do not establish a regression in unmodified Nyxus/Hylix implementations.

Every family

Ranges below cover the existing matrix only; the separate query CSV adds 16 cases each for FrozenHashMap, FrozenHashSet and FrozenSortedMap. Lower percentages mean fewer complete instructions. Unchanged algorithms receive only shared-path/compiler effects.

Family Cases Lower/equal/higher Endpoint change, best to least
FixedVec 17 17/0/0 -8.108% to -0.008%
SlotArena 13 13/0/0 -1.045% to -0.009%
BitmapSet 12 12/0/0 -0.260% to -0.010%
FrozenHashMap 11 3/0/8 -64.058% to +0.021%
FrozenSortedMap 14 3/3/8 -0.008% to +0.016%
FrozenHashSet 17 17/0/0 -67.522% to -0.005%
FrozenPrefixSums 12 12/0/0 -1.190% to -0.018%
BlockedBloomFilter 75 67/8/0 -4.403% to +0.000%
MinimaHll 31 31/0/0 -19.340% to -0.005%
CountMinSketch 26 26/0/0 -16.172% to -0.039%
BlockedCountingBloom 32 32/0/0 -0.696% to -0.009%
CuckooFilter 19 19/0/0 -4.622% to -0.010%
FrozenBinaryFuse 24 24/0/0 -1.769% to -0.029%
FrozenRibbon 3 3/0/0 -0.284% to -0.010%
RatelessIBLT 2 2/0/0 -1.717% to -0.114%
MementoFilter 3 3/0/0 -27.442% to -1.294%
SetSketch 3 3/0/0 -0.010% to -0.002%
BreadcrumbFilter 3 3/0/0 -0.271% to -0.010%
QSketch 2 2/0/0 -6.704% to -0.007%
OmniSketch 3 3/0/0 -0.706% to -0.057%
DDSketch 2 2/0/0 -0.010% to -0.009%
ExaLogLog 2 2/0/0 -0.010% to -0.007%
FrozenZor 2 2/0/0 -0.296% to -0.012%
AerisFilter 2 2/0/0 -25.031% to -2.190%
ExternalGraphSketch 3 3/0/0 -0.212% to -0.139%
FrozenPhobic 2 2/0/0 -0.273% to -0.010%

What changed and what did not

The engine dispatches a whole single-block byte range after one admitted-directory lookup; checked cross-block handling remains separate. CountMin reads directly into initialized little-endian typed scratch and joins exactly adjacent commit spans after global overflow preflight. HLL uses a wider safe histogram with per-page invalid-rank detection. Memento/Aeris decode their selected packed spans directly; QSketch hoists an unchanged-register guard. Frozen hash batches group primary buckets, compact misses, group backups and restore original output positions.

The candidate SetSketch cutoff cache and OmniSketch intersection rewrite were rejected after actual IC measurements: they increased their target calls. Selected Main restores their original kernels. Their code, measurements and reasons remain in the experiment evidence.

Every recorded heap-page access/write charge is unchanged in both matrices. Gains therefore reduce the non-heap-page instruction remainder, which still includes stable/helper/API charges; this is not isolated CPU or per-patch attribution. The source changes target computation, copies and repeated provider work rather than startup pages. Bounded repeated-32 profiles show frozen hash map/set reads falling from 32 to one, and sorted reads from 96 to three, with unchanged 800,000 heap-page instructions. Profile/provider counts are diagnostic and do not imply that every stable API call pays a native admission fee.

Qualification and limits

All five canonical wasm64 artifacts and five actual-canister suites passed at selected Main. The core, sketch and paper suites retain their scoped install, KEEP, contract rejection, rollback, restoration and temporary-owner checks; the operation and query-only lanes add no independent upgrade claim. Native checks passed 360 tests with one pre-existing ignore. Independent reviewers replayed business outputs, source/measurement pins, raw core/sketch/query ledgers, paper diagnostics and bounded profiles. Exact bounds, ownership, live generations and overflow preflight remain enforced.

Nyxus/Hylix RRT dependency inputs are unchanged by exact source-closure proof. Their existing qualification is reused; this round claims no fresh Heavy16 throughput or latency measurement. Concurrent host timings are diagnostic. The matrix does not time every API/type/population or prove a universal gain; full per-function deltas and the rejected combined candidate are retained.