Checked scalar decoder inlining
Baseline: d8635bf / accepted benchmark 005041.
Status: accepted in the qualified 014045 combination after the reviewed standalone screen. The combined qualification and final comparison retain this small shared change; standalone observations remain separate below.
source.patch adds only #[inline(always)] to Store's safe get64 decoder.
The baseline RTree and Map Wasms contain 25 static calls to this decoder;
its overflow/length checks survive even at constant 64-byte-header call sites.
Inlining gives LLVM those proofs. No check, format, public API or ownership
behavior is removed. See runtime research.
Patch SHA-256:
efd72f68d8c2fce10813fee0bf4d9efbbcc525ba547a844603beeb55827655c8.
Root authorized a matched screen; independent source review approved the exact patch hash above. Eight final Wasms, 88 native checks and the PocketIC screen passed independent provenance review. The measurement owner alone applies/builds/screens the patch; this folder does not itself change production. The separate two-helper ordinary-read inlining candidate is included with this change in the qualified combination linked above. Run existing Store malformed/stale-input tests and the Map/NodeStore/RTree/sequence cohorts across both placements. Check unchanged payload and memory outputs.
Reproduce static evidence with python3 inspect.py <final.wasm> --label <name>.
It invokes wasm2wat --enable-memory64; the inventory is not dynamic profiling.
Baseline extracts are from frozen run 005041 worker artifacts. Compare the final
candidate's helper definitions/call sites and Wasm bytes, then use ordinary
PocketIC counters to accept or reject. A smaller call graph alone is not proof
of faster real operations.
The frozen standalone RTree retained candidate is 1,010,503 bytes (375 fewer),
SHA-256 f2855f1188a570eae4d476c3deb004e17013b66c39cd9ffae6e530f754d60152.
The Map retained candidate also shrinks 375 bytes. Both remove the get64
definition and all 25 static calls. decode_block now uses direct loads at known
header offsets and shares the repeated offset-16 load; dynamic id_at still
contains slice-failure checks. Bulk-copy site counts are unchanged. Archived
candidate artifacts and exact extracts are referenced in candidate-*-codegen.json.
The standalone report
records the measured gain. At 100k, Map hit/miss/single-insert medians save 304
instructions in each backing; full RTree paged traversals save 5,657,828 across
all tested budgets and both backings (about 0.54–1.22% of body cost). These are
small broad gains, not a solution to region costs or every prior regression.
Final combined run 014045 includes this patch with the other selected changes.
Read-only inspection of its archived RTree/Map Wasms in both placements confirms
get64 remains absent and dynamic id_at retains bounds-failure branches.
combined-*-codegen.json records the exact artifacts. The complete combination
has 1,986 improved and 18 regressed API cases in three trials; those aggregate
results are not attributed to the scalar change alone.