perf(prover): slim MEMW table#436
Conversation
…W virtual columns, remove R1-R3 LT overflow checks and IS_HALFWORD bitwise lookups
Codex Code Review
|
|
/bench |
Benchmark — fib_iterative_2M (median of 3)Table parallelism: 32 (auto = cores / 3)
Memory GrowthMeasured with
Growth rate: 10651 MB / 1M steps (main: 13379, Δ: -20.4%)
Commit: adc6595 · Baseline: cached · Runner: self-hosted bench |
Review: Slim MEMW TableOverall the optimization is clean -- replacing 28 stored DWordHL columns with 7 carry bits and making Two issues flagged inline: Medium -- 64-bit address overflow no longer caught in MEMW The old R1-R3 LT checks and IS_HALFWORD range checks on Low -- Incomplete test coverage for mixed overflow
|
Align code comments with the updated spec (others/spec/memw.md): CM16-23 → CM8-15, CO24-25 → CO16-17
* Slim MEMW table: replace address_add[7] DWordHL with ADD_LIMB_OVERFLOW virtual columns, remove R1-R3 LT overflow checks and IS_HALFWORD bitwise lookups * Fix comments * add assertion in a test to check memw is used * docs(memw): update bus interaction tag numbers to match slim spec Align code comments with the updated spec (others/spec/memw.md): CM16-23 → CM8-15, CO24-25 → CO16-17 * Add documentation and unit test --------- Co-authored-by: MauroFab <maurotoscano2@gmail.com>
Description
This PR Implements the MEMW spec changes introduced in PR #398 ("Losing some MEMW weight"):
address_add[7]DWordHL columns (28 field elements) withadd_limb_overflow[7]Bit columns (7 field elements), makingaddress_adda virtual column computed viaBusValue::linear.base_address < base_address + offset): address overflow is now handled implicitly by the carry bit in the virtual formula.AddConstraintpairs withIsBitConstraint::unconditionalfor each overflow bit.Result: 70 → 49 main columns, 57 → 26 bus interactions.