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.
翻译:本文提议了用于 Python 专用的剖面器 Scosene 。 缩放将一系列创新组合合并到精确和同时的剖面 CPU、 内存和 GPU 使用上, 全部都是低端的。 缩放的 CPU 和 内存剖面器帮助 Python 程序员通过区分低效 Python 和 高效本地执行时间和内存使用来引导他们的优化努力。 缩放的内存剖面器采用了一种新的取样算法, 使得它能够以低端但高精度操作。 它还包含一个新的算法, 可以自动定位内存泄漏, 无论是在 Python 内部还是跨 Python 内边界。 缩放的缩放面跟踪一个叫做新公标的复制量, 显示在 Python 静默转换 C 和 Python 数据显示之间, 或者在 CPU 和 GPU 之间可以进行昂贵的复制操作。 自从 引入以来, Scardne 被广泛采用以来, 已经下载了 超过 500 000 。 我们介绍了经验报告。 我们介绍了使用Scolgen 的开发者的经验报告, 。 我们从使用Scolver 来使用 Scapeciduce 实现显著的开发者的经验报告。