IMPL9.md (1082B)
1 # IMPL9: Add Bench Suites for Parser/CFG/Analysis 2 3 ## Summary 4 5 Implement criterion and weigh benchmark suites to measure parsing, CFG 6 construction, and taint analysis performance. 7 8 ## Steps 9 10 1) Add benchmark entrypoints 11 - Create/extend `bench/Main.hs` using criterion. 12 - Create/extend `bench/Weight.hs` using weigh. 13 14 2) Select fixtures 15 - Use one large real dump from `etc/` (e.g., `secp256k1NCG.s`). 16 - Add a smaller fixture if needed for quick local iteration. 17 18 3) Benchmark groups 19 - `parse`: parse assembly into `[Line]`. 20 - `cfg`: build CFG from parsed lines. 21 - `taint`: run intra-proc dataflow and optionally inter-proc. 22 23 4) NFData instances 24 - Define NFData instances for core types if needed (Line, CFG, etc.) to 25 ensure full evaluation in benchmarks. 26 27 5) Wire into cabal 28 - Ensure benchmark stanzas exist in `ppad-auditor.cabal` for criterion 29 and weigh targets. 30 31 ## Files to Touch 32 33 - `bench/Main.hs` 34 - `bench/Weight.hs` 35 - `ppad-auditor.cabal` 36 - `lib/` (NFData instances if required) 37 38 ## Validation 39 40 - `cabal bench` 41 - Confirm criterion and weigh suites run and report results.