graph TB subgraph ckpttn-rs A1["fm_bi_gain_calc.rs\nfm_bi_gain_mgr.rs"] A2["part_mgr_base.rs\nml_part_mgr.rs"] A3["fm_kway_gain_calc.rs"] end subgraph ckpttn-cpp B1["FMBiGainCalc.hpp\nFMBiGainMgr.hpp"] B2["PartMgrBase.hpp\nMLPartMgr.hpp"] B3["FMKWayGainCalc.hpp"] end subgraph ckpttnpy D1["FMBiGainCalc.py\nFMBiGainMgr.py"] D2["PartMgrBase.py\nMLPartMgr.py"] D3["FMKWayGainCalc.py"] end A1 -.->|"same algorithm"| B1 A1 -.->|"same algorithm"| D1 A2 -.->|"same algorithm"| B2 A2 -.->|"same algorithm"| D2 A3 -.->|"same algorithm"| B3 A3 -.->|"same algorithm"| D3 style A1 fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style A2 fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style A3 fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style B1 fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style B2 fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style B3 fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style D1 fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style D2 fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style D3 fill:#e3f2fd,stroke:#1565c0,stroke-width:3px
graph LR R[🦀 Rust 28 files238 tests] C[⚡ C++ 106 filesstress-tested] P[🐍 Python 19 files23 tests] C -->|"fastest"| M{{"FM Algorithm\nIdentical Logic"}} R -->|"balanced"| M P -->|"prototyping"| M style R fill:#f3e5f5,stroke:#7b1fa2,stroke-width:3px style C fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px style P fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style M fill:#e3f2fd,stroke:#1565c0,stroke-width:3px
graph LR A["Rust 238 ✅"] --> D["262 Total\nAll Passing"] B["C++ large suite ✅"] --> D C["Python 23 ✅"] --> D style A fill:#f3e5f5,stroke:#7b1fa2,stroke-width:3px style B fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px style C fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style D fill:#e3f2fd,stroke:#1565c0,stroke-width:3px
graph LR subgraph p1["p1 Runtime (log scale, ms)"] CPP["C++ 3.42 ms 🥇"] --> RUST["Rust 51.2 ms 🥈"] RUST --> PY["Python 202 ms 🥉"] end style CPP fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px style RUST fill:#f3e5f5,stroke:#7b1fa2,stroke-width:3px style PY fill:#e3f2fd,stroke:#1565c0,stroke-width:3px
graph LR subgraph ibm03["ibm03 Runtime (ms, log scale)"] CPP2["C++ 262 ms 🥇"] --> RUST2["Rust 1,467 ms 🥈"] RUST2 --> PY2["Python 9,691 ms 🥉"] end style CPP2 fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px style RUST2 fill:#f3e5f5,stroke:#7b1fa2,stroke-width:3px style PY2 fill:#e3f2fd,stroke:#1565c0,stroke-width:3px
graph LR subgraph scaling["Scaling Factor (p1 → ibm03)"] CScale["C++ 76× 🐌"] --> RScale["Rust 29× 🚀"] RScale --> PScale["Python 48× 🐢"] end style CScale fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px style RScale fill:#f3e5f5,stroke:#7b1fa2,stroke-width:3px style PScale fill:#e3f2fd,stroke:#1565c0,stroke-width:3px
graph TB subgraph legend["Legend"] L1["🥇 Fastest"] --- L2["🥈 Middle"] --- L3["🥉 Slowest"] end subgraph p1res["p1 (833 modules)"] P1C["C++ 3.42 ms 🥇"] P1R["Rust 51.2 ms 🥈"] P1P["Python 202 ms 🥉"] end subgraph ibmres["ibm03 (23k modules)"] I1C["C++ 262 ms 🥇"] I1R["Rust 1,467 ms 🥈"] I1P["Python 9,691 ms 🥉"] end P1C --> I1C P1R --> I1R P1P --> I1P style P1C fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px style P1R fill:#f3e5f5,stroke:#7b1fa2,stroke-width:3px style P1P fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style I1C fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px style I1R fill:#f3e5f5,stroke:#7b1fa2,stroke-width:3px style I1P fill:#e3f2fd,stroke:#1565c0,stroke-width:3px
graph LR subgraph done["✅ Done"] A["delta_gain_w rename"] B["Cross-validation tests"] C["Criterion benchmarks"] D["Head-to-head comparison"] end subgraph next["🚀 Next"] E["Python rename PR\n(totalcost → total_cost)"] F["Flat Vec storage\nin Rust hot paths"] G["Benchmark\nFMKWay (k-way)"] end A --> E B --> F C --> G style done fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px style next fill:#e3f2fd,stroke:#1565c0,stroke-width:3px