Transpiling Python to Rust for Optimized Performance

Tutkimustuotos: Conference contributionScientificvertaisarvioitu


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.
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
ISBN (elektroninen)978-3-030-60939-9
ISBN (painettu)978-3-030-60938-2
DOI - pysyväislinkit
TilaJulkaistu - 7 lokakuuta 2020
OKM-julkaisutyyppiA4 Artikkeli konferenssijulkaisussa
TapahtumaInternational Conference on Embedded Computer Systems: Architectures, Modeling and Simulation -
Kesto: 5 heinäkuuta 20209 tammikuuta 2021


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


ConferenceInternational Conference on Embedded Computer Systems: Architectures, Modeling and Simulation


  • Jufo-taso 1


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

Siteeraa tätä