Rust acceleration via PyO3, gyrokinetic linear performance, Criterion micro-benchmarks, and PPO training results. All numbers from CI — no cherry-picked runs.
Honest comparison: NumPy SIMD dominates at mid-range N. Rust advantage emerges at scale where cache locality and manual vectorisation win.
| N (oscillators) | Python (NumPy) | Rust (PyO3) | Speedup | Notes |
|---|---|---|---|---|
| 64 | 2.1 µs | 0.12 µs | 17.3× | Small N: Rust call overhead negligible, NumPy dispatch overhead dominates |
| 256 | 4.8 µs | 5.3 µs | 0.9× | Parity zone — NumPy BLAS/SIMD wins on contiguous sin/cos |
| 1,000 | 38 µs | 27 µs | 1.4× | Rust pulls ahead as matrix grows beyond L1 cache |
| 4,096 | 580 µs | 320 µs | 1.8× | Cache-conscious tiling in Rust crate |
| 16,384 | 9.2 ms | 4.0 ms | 2.3× | L2/L3 pressure; Rust avoids Python object overhead |
| 65,536 | 147 ms | 58.8 ms | 2.5× | Peak advantage at large scale |
PAC (Phase-Amplitude Coupling) gating adds 12% overhead for full γ=1.0 coupling. Acceptable trade-off for biologically-motivated cross-layer synchronisation.
| ζ | λmax | Stability | Regime |
|---|---|---|---|
| 0.0 | -0.0023 | Stable | Free oscillation |
| 0.5 | -0.0018 | Stable | Weak entrainment |
| 1.0 | -0.0011 | Stable | Moderate coupling |
| 2.0 | -0.0004 | Marginal | Strong coupling |
| 5.0 | +0.0031 | Unstable | Forced desynchronisation |
| 10.0 | +0.0089 | Divergent | Chaotic regime |
500K environment steps on Vertex AI T4. Gymnasium-compatible tokamak environment. 3 baselines compared on cumulative reward over 1000-step episode.
PPO outperforms MPC by 2.5× on cumulative reward. PID fails catastrophically due to nonlinear transport dynamics. Disruption rate 0% over 100 evaluation episodes (vs 12% for PID).