arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2507.00264cs.PLcs.DCcs.PFcs.SE
收藏

Python库的Rust与C对比:评估兼容Rust的绑定工具链

Rust vs. C for Python Libraries: Evaluating Rust-Compatible Bindings Toolchains

Isabella Basso do Amaral, Renato Cordeiro Ferreira, Alfredo Goldman

AI总结:

本研究评估了Rust的PyO3 Python绑定工具链与ctypes和cffi的性能及易用性,发现其能实现最先进性能且无需担心API兼容性。

摘要:

Python编程语言以其语法和科学库而闻名,但也因其解释器缓慢而声名狼藉。优化Python中的关键部分需要掌握编程语言间二进制交互的专门知识,手动接口可能很麻烦,实现者经常求助于复杂的第三方库。这项比较研究评估了Rust的PyO3 Python绑定工具链相对于ctypes和cffi的性能和易用性。通过使用为Python开发的Rust工具,我们能够实现最先进的性能,而无需担心API兼容性。

英文摘要:

The Python programming language is best known for its syntax and scientific libraries, but it is also notorious for its slow interpreter. Optimizing critical sections in Python entails special knowledge of the binary interactions between programming languages, and can be cumbersome to interface manually, with implementers often resorting to convoluted third-party libraries. This comparative study evaluates the performance and ease of use of the PyO3 Python bindings toolchain for Rust against ctypes and cffi. By using Rust tooling developed for Python, we can achieve state-of-the-art performance with no concern for API compatibility.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑