When Safe Code is Fast - Scientific Computing in Rust
Talkat RustConf 2026 · on Wednesday, 2026-09-09· at 16:00· Room 510ac | Palais des Congrès de Montréal, Palais des Congrès de Montréal·
summary
Rust compiler adds enzyme autoiff (nightly) and a cross‑vendor offload component for GPUs; safe Rust often outperforms unsafe in real benchmarks. adbench shows unsafe code hitting ~10x slower cases and generating 1 million allocations versus 11, with memory jumps (≈40 MB vs ≈800 MB). A GPT‑2 port explodes to ~300 GB of AD data until assertions are used, dropping to ~2 GB. GPU offload infers transfers and moves less data than C++ (≈70% of C++ in some workloads).
AI-written summary · about
chapters (10)
- 0:00Introduction and background
- 3:14Safe Rust vs performance myths
- 5:19Performance pitfall with raw pointers
- 8:52Gaussian mixture models case study
- 11:43Unsafe Rust and compile times
- 14:36GPT2 automatic differentiation issue
- 19:52GPU offload in Rust compiler
- 23:03Safe GPU data management
- 27:41GPU optimizations and interfaces
- 30:07Acknowledgements and summary








