论文标题

多线程CPU结合应用程序的Python翻译器的性能比较

Performance Comparison of Python Translators for a Multi-threaded CPU-bound Application

论文作者

Milla, Andrés, Rucci, Enzo

论文摘要

目前,Python是各种应用领域中使用最广泛的语言之一。但是,由于其官方CPYTHON解释器的性质,特别是针对CPU结合的应用程序,它在优化和并行化应用程序方面存在局限性。为了解决这个问题,已经出现了几个替代翻译人员,每个翻译人员都有不同的方法及其自身的成本效果比。由于缺乏比较研究,我们使用N体作为案例研究(一个众所周知的具有高计算需求的问题)对这些翻译人员进行了性能比较。获得的结果表明,CPYTHON和PYPY在涉及并行化算法时的局限性表现出较差的性能。尽管Numba和Cython的性能显着更高,但事实证明是加快数值算法的可行选择。

Currently, Python is one of the most widely used languages in various application areas. However, it has limitations when it comes to optimizing and parallelizing applications due to the nature of its official CPython interpreter, especially for CPU-bound applications. To solve this problem, several alternative translators have emerged, each with a different approach and its own cost-performance ratio. Due to the absence of comparative studies, we have carried out a performance comparison of these translators using N-Body as a case study (a well-known problem with high computational demand). The results obtained show that CPython and PyPy presented poor performance due to their limitations when it comes to parallelizing algorithms; while Numba and Cython achieved significantly higher performance, proving to be viable options to speed up numerical algorithms.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源