~/talk

Nine Rules for Writing Python Extensions in Rust

Talkat PyData Seattle 2023 · on Friday, 2023-04-28· at 14:15· Hood· [rust, python]
linkedin:carlk
slides:none on file

Nine concrete rules and examples show how ported genomics C++ extension to Rust (a plink bed file reader) replaces OpenMP with Rayon, uses pyo3 and numpy/ndarray crates, and reads subsets of huge datasets (tens of thousands to millions of SNPs and users). Claims: Rust matches C/C++ speed, improves memory safety, and enables safe multithreading. The port works as a usable Python extension, uncovers a latent C++ data race, and provides a live demo and article for reproducible steps.

AI-written summary · about

  1. 0:00Introduction
  2. 4:16Python extensions in Rust
  3. 9:56Nine rules for Rust extensions
  4. 12:52Rust-Python integration
  5. 16:03Error handling
  6. 18:36Multi-threading with Rayon
  7. 23:59Handling data types
  8. 25:04Testing strategies
  9. 26:53Rust vs Cython or Numba
  10. 33:21Unsafe code in Rust
  11. 34:48Team and maintenance costs
  12. 36:33Alternatives for performance
  13. 37:41Rust vs C for numeric computing
  14. 38:45Build and deployment
  15. 39:26Future of Rust in ML
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.