Process tables sequentially to reduce peak memory#299
Conversation
Kimi Code ReviewSecurity Vulnerabilities
Potential Bugs
Performance Issues
Simplicity
ConclusionThe changes in the PR diff introduce potential memory safety issues and logic errors due to the removal of the evaluations from the main commitment data structure. It's crucial to ensure that the evaluations are either recomputed when needed or stored safely to avoid undefined behavior. Additionally, the performance implications of recomputing evaluations should be considered. The code simplification is a positive aspect, but it should be justified with clear documentation or comments. Automated review by Kimi (Moonshot AI) |
6b78585 to
5ec422f
Compare
Codex Code ReviewFindings
Notes
|
Security & Correctness ReviewReviewed PR #299 focusing on security vulnerabilities, bugs, performance, and simplicity. ✅ No Critical Issues in ChangesThe refactoring is cryptographically sound and correct: 1. Transcript ordering preserved
2. LogUp challenges still secure
3. Memory optimization achieved
4. No timing attacks
Performance ✓Reasonable tradeoff:
Code Quality ✓
Pre-existing Note (not blocking)
✅ Approved - Changes are correct and achieve the stated goal. |
|
we should merge #296 to see hyperfine's results |
📊 Memory Profile ResultsProgram:
Peak Allocation Stack Trace: Comparison with
|
| Metric | main | This PR | Change |
|---|---|---|---|
| Peak Memory | 231.71 MB | 198.24 MB | ✅ -33.47 MB (-14.44%) |
| Total Allocated | 4251.33 MB | 4327.08 MB |
View detailed profile
- Download the artifact
- Extract
dhat-heap.jsonfrom the zip - Upload to dh_view
|
Benchmark Results for unmodified programs 🚀
|
|
Method: Poll Machine: Results (2^19 instructions, bench_512k):
|
Prover Profile (arith_8.elf)
|
MauroToscano
left a comment
There was a problem hiding this comment.
This extra computation needs to be further measured, it seems like with big programs it will get a big penalty.
|
/bench |
Benchmark — fib_iterative_372k (median of 3)
Commit: a352047 · Baseline: built from main · Runner: self-hosted bench |
|
superseded by #349 |

Instead of collecting all LDE evaluations upfront across all tables, process each table sequentially: recompute LDE evaluations from polynomials on demand and free them after the table's proof is generated. Verifier ordering updated to match.