This paper presents a benchmarking analysis comparing the performance of data structures implemented in PyO3 Rust plugins against native Python implementations. The benchmarked data structures include Structure of Arrays (SoA), Array of Structures (AoS), linked lists, and vectors. Rust and Python implementations of each structure were compared, facilitated by PyO3’s wrapping functionality. Benchmarks assessed data access and manipulation, running for 100 iterations across varying element sizes. Results revealed the Rust data structures outperformed the native python implementations with the exception of the Rust AoS plugin.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Benchmark Performance of a Rust-Based Python Extension

  • Ethan J. Schofield,
  • Douglas D. Hodson

摘要

This paper presents a benchmarking analysis comparing the performance of data structures implemented in PyO3 Rust plugins against native Python implementations. The benchmarked data structures include Structure of Arrays (SoA), Array of Structures (AoS), linked lists, and vectors. Rust and Python implementations of each structure were compared, facilitated by PyO3’s wrapping functionality. Benchmarks assessed data access and manipulation, running for 100 iterations across varying element sizes. Results revealed the Rust data structures outperformed the native python implementations with the exception of the Rust AoS plugin.