Scaling Performance

WorkloadPython/NumPyRust BatchNotes
High-frequency control (N=16)15.9 µs/step1.7 µs/stepReal-time control loop
Massive swarms (N=1,024)14.2 ms/step12.9 ms/stepSwarmalator dynamics
City-scale networks (N=10,000)∼850 ms for 100M edgesStress test limit

Rust vs Python Speedups

54 Rust modules via PyO3 FFI. Pure Python fallback always available. Two modules (phase_extract, coupling_est) use Python/LAPACK because FFT/BLAS outperforms Rust.

ModuleSpeedupNotes
Ott-Antonsen reduction96×Best case: O(1) mean-field
Standard Kuramoto step9.4×N=16, RK4
Coupling plasticity8.2×Hebbian update
Chimera detection5.7×Local R profiling
Transfer entropy4.1×Directed causality
Stuart-Landau step3.8×Complex amplitude
Hodge decomposition2.4×Sparse matrix ops
Phase extraction0.8×LAPACK FFT faster
Coupling estimation0.9×LAPACK BLAS faster

Honest comparison: Rust auto-select disabled for 2 modules where Python/LAPACK wins.

Hardware Targets

FPGA (Zynq-7020)
Verilog kuramoto_core.v. Sub-15 µs latency per step. Fixed-point Kuramoto with configurable N. Synthesisable RTL.
GPU (JAX/CUDA)
Differentiable nn/ module on GPU. First local benchmark on GTX 1060 6GB (JAX 0.9.2). vmap for batched parameter sweeps.
WebAssembly
spo-wasm crate. 66 KB Kuramoto engine running in the browser. Interactive demo at docs/demo/index.html.
Bare Metal
Rust spo-engine with no_std support planned. Target: embedded real-time control on ARM Cortex-M.

Test Infrastructure

3,945 Python + 567 Rust Tests — 99% Coverage

Property-based testing with Hypothesis (680+ tests). Physics validation suite: 194 tests across 13 phases. Stress tests: N=1,000 oscillators, T=50,000 steps. Degenerate edge cases: N=1, dt=0, zero coupling. Mutation testing: 32 killer tests. 9 CI/CD workflows with security scanning (Bandit, CodeQL, Trivy).