Transpiling Python to Rust for Optimized Performance

Tutkimustuotos: KonferenssiartikkeliTieteellinenvertaisarvioitu

4 Sitaatiot (Scopus)
350 Lataukset (Pure)

Abstrakti

Python has become the de facto programming language in machine learning and scientific computing, but high performance implementations are challenging to create especially for embedded systems with limited resources. We address the challenge of compiling and optimizing Python source code for a low-level target by introducing Rust as an intermediate source code step. We show that pre-existing Python implementations that depend on optimized libraries, such as NumPy, can be transpiled to Rust semi-automatically, with potential for further automation. We use two representative test cases, Black–Scholes for financial options pricing and robot trajectory optimization. The results show up to 12× speedup and 1.5× less memory use on PC, and the same performance but 4× less memory use on an ARM processor on PYNQ SoC FPGA. We also present a comprehensive list of factors for the process, to show the potential for fully automated transpilation. Our findings are generally applicable and can improve the performance of many Python applications while keeping their easy programmability.
AlkuperäiskieliEnglanti
OtsikkoEmbedded Computer Systems: Architectures, Modeling, and Simulation
Alaotsikko20th International Conference, SAMOS 2020, Samos, Greece, July 5–9, 2020, Proceedings
ToimittajatAlex Orailoglu, Matthias Jung, Marc Reichenbach
KustantajaSpringer
Sivut127-138
Sivumäärä11
Vuosikerta12471
ISBN (elektroninen)978-3-030-60939-9
ISBN (painettu)978-3-030-60938-2
DOI - pysyväislinkit
TilaJulkaistu - 7 lokak. 2020
OKM-julkaisutyyppiA4 Artikkeli konferenssijulkaisussa
TapahtumaInternational Conference on Embedded Computer Systems: Architectures, Modeling and Simulation -
Kesto: 5 heinäk. 20209 tammik. 2021

Julkaisusarja

NimiLecture Notes in Computer Science
KustantajaSpringer Link
Vuosikerta12471
ISSN (painettu)0302-9743
ISSN (elektroninen)1611-3349

Conference

ConferenceInternational Conference on Embedded Computer Systems: Architectures, Modeling and Simulation
Ajanjakso5/07/209/01/21

Julkaisufoorumi-taso

  • Jufo-taso 1

Sormenjälki

Sukella tutkimusaiheisiin 'Transpiling Python to Rust for Optimized Performance'. Ne muodostavat yhdessä ainutlaatuisen sormenjäljen.

Siteeraa tätä