Colloquium 2023 Modern Approaches to Profiling in Python with Scalene

From SHARCNETHelp
Revision as of 12:08, 3 May 2023 by Syam (talk | contribs) (Created page with "Python is a language developers choose to write in for convenience rather than speed. However, speed can be recovered by offloading calculations to libraries which leverage lo...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Python is a language developers choose to write in for convenience rather than speed. However, speed can be recovered by offloading calculations to libraries which leverage lower level languages like NumPy, Cython, and more. Scalene is a high-performance CPU, GPU, and memory profiler which can illustrate where code should be passing calculations to other libraries for significant increases in speed. Scalene also includes support for Jupyter Notebooks, OpenAI suggestions for vectorizing code, as well as a significantly lower overhead and higher accuracy than other profilers. This talk will introduce the concepts required for understanding why external libraries are faster than native Python, interactions with approaches such as Cython and Just-in-Time compilers, as well as a live demonstration of Scalene on the Alliance systems inside of a Jupyter Notebook. Familiarity with Python, virtual environments, and Jupyter notebooks will be assumed.