论文标题

三角尺尺肌的性能问题

Triangulating Python Performance Issues with Scalene

论文作者

Berger, Emery D., Stern, Sam, Pizzorno, Juan Altmayer

论文摘要

本文提出了Scalene,这是一家专门用于Python的探索器。 Scalene将一系列创新结合在一起,同时介绍了CPU,内存和GPU使用情况,所有创新都具有低开销。 Scalene的CPU和内存介绍者通过区分低效的Python和有效的本机执行时间和内存使用情况来帮助Python程序员指导其优化工作。 Scalene的记忆剖面师采用了一种新颖的采样算法,该算法使其可以以低的开销但高精度运行。它还结合了一种新型算法,该算法可以自动查明内存泄漏,无论是在Python内还是跨Python-native边界。 Scalene跟踪一个名为复制卷的新公制,该指标突出显示了Python在C和Python数据表示之间或CPU和GPU之间默默转换时可能发生的昂贵复制操作。自引入以来,Scalene已被广泛采用,迄今为止下载了500,000多个。我们提出了开发人员的经验报告,这些开发人员使用Scalene来实现大量的性能改进和存储器节省。

This paper proposes Scalene, a profiler specialized for Python. Scalene combines a suite of innovations to precisely and simultaneously profile CPU, memory, and GPU usage, all with low overhead. Scalene's CPU and memory profilers help Python programmers direct their optimization efforts by distinguishing between inefficient Python and efficient native execution time and memory usage. Scalene's memory profiler employs a novel sampling algorithm that lets it operate with low overhead yet high precision. It also incorporates a novel algorithm that automatically pinpoints memory leaks, whether within Python or across the Python-native boundary. Scalene tracks a new metric called copy volume, which highlights costly copying operations that can occur when Python silently converts between C and Python data representations, or between CPU and GPU. Since its introduction, Scalene has been widely adopted, with over 500,000 downloads to date. We present experience reports from developers who used Scalene to achieve significant performance improvements and memory savings.

扫码加入交流群

加入微信交流群

微信交流群二维码

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