PyO3/pyo3

Expand performance section of the guide

Open

#3310 aperta il 11 lug 2023

Vedi su GitHub
 (8 commenti) (4 reazioni) (0 assegnatari)Rust (668 fork)batch import
Good First Issue

Metriche repository

Star
 (10.152 star)
Metriche merge PR
 (Merge medio 12g 19h) (64 PR mergiate in 30 g)

Descrizione

  • Overhead of conversions (i.e. PyList vs Vec etc.)
  • String intern!
  • Vec<u8> becoming list[int] (and thus being very slow), usage of Cow<[u8]> as an alternative
  • #[pyo3(get)] deep-cloning non-Py data
  • dictionary dispatch, i.e. look-up based on type object identity

Guida contributor