perf: LUT + parallel constant-composition check on RankQuant load#281
perf: LUT + parallel constant-composition check on RankQuant load#281Nelson Spence (Fieldnote-Echo) wants to merge 1 commit into
Conversation
load_rankquant's forged-buffer defense histogrammed every packed code serially — 1.29 billion shift/mask ops at 1.26M x 1024, ~1s of the 1.27s verified open. A 4KB per-byte bucket-count LUT replaces the per-code inner loop and rows validate in parallel; find_first keeps the lowest-offending-row error contract, with a scalar recheck producing the identical message. The security property is unchanged: every row still proves uniform composition before the index is usable.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
PR Summary by QodoSpeed up RankQuant load validation with LUT + parallel row checks
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Summary
load_rankquant's forged-buffer defense (constant-composition histogram) ran serially over every packed code — 1.29 billion shift/mask ops at 1.26M × 1024, ~1.0s of the 1.27s verified open (attribution:verify_for_loadalone is 0.215s; SHA-NI is fine — the loader was the cost).find_firstpreserves the lowest-offending-row contract, and a scalar recheck of that row produces the byte-identical error messageExpected verified-open: 1.27s → ~0.3s at 1.26M×1024 (measured number follows in the integration rerun).
Independent branch off main (touches only
rank_io.rs). 250 tests green, clippy-D warnings, fmt.