<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Profiling on Ryan Orban</title><link>https://ryanorban.com/categories/profiling/</link><description>Recent content in Profiling on Ryan Orban</description><generator>Hugo</generator><language>en-us</language><managingEditor>me@ryanorban.com (Ryan Orban)</managingEditor><webMaster>me@ryanorban.com (Ryan Orban)</webMaster><copyright>Ryan Orban</copyright><lastBuildDate>Sat, 26 Feb 2022 00:00:00 +0000</lastBuildDate><atom:link href="https://ryanorban.com/categories/profiling/index.xml" rel="self" type="application/rss+xml"/><item><title>Scalene: High-Performance Python Profiler</title><link>https://ryanorban.com/notes/scalene-python-profiler/</link><pubDate>Sat, 26 Feb 2022 00:00:00 +0000</pubDate><author>me@ryanorban.com (Ryan Orban)</author><guid>https://ryanorban.com/notes/scalene-python-profiler/</guid><description>&lt;h3 id="summary" class="scroll-mt-8 group"&gt;
 Summary
 
 &lt;a href="#summary"
 class="no-underline hidden opacity-50 hover:opacity-100 !text-inherit group-hover:inline-block"
 aria-hidden="true" title="Link to this heading" tabindex="-1"&gt;
 &lt;svg
 xmlns="http://www.w3.org/2000/svg"
 width="16"
 height="16"
 fill="none"
 stroke="currentColor"
 stroke-linecap="round"
 stroke-linejoin="round"
 stroke-width="2"
 class="lucide lucide-link w-4 h-4 block"
 viewBox="0 0 24 24"
&gt;
 &lt;path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" /&gt;
 &lt;path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" /&gt;
&lt;/svg&gt;

 &lt;/a&gt;
 
&lt;/h3&gt;
&lt;p&gt;Scalene is an open-source Python profiler from the PLASMA lab at UMass Amherst that simultaneously profiles CPU time, GPU time, and memory allocation at the line level with very low overhead. It does things standard profilers like &lt;code&gt;cProfile&lt;/code&gt; can&amp;rsquo;t: it distinguishes time spent in Python code from time spent in native C/C++ extensions, tracks memory allocation by line (not just total), detects memory copy operations (often the hidden cost in NumPy and PyTorch code), and reports potential GPU memory usage.&lt;/p&gt;</description></item><item><title>Speeding Up Your Python Code</title><link>https://ryanorban.com/notes/speeding-up-python-code/</link><pubDate>Mon, 18 Mar 2013 00:00:00 +0000</pubDate><author>me@ryanorban.com (Ryan Orban)</author><guid>https://ryanorban.com/notes/speeding-up-python-code/</guid><description>&lt;p&gt;&lt;img
 src="https://ryanorban.com/images/notes/speeding-up-python-code.png"
 alt="Speeding Up Your Python Code" class="note-hero-img"
 loading="lazy"
/&gt;
&lt;/p&gt;
&lt;h3 id="summary" class="scroll-mt-8 group"&gt;
 Summary
 
 &lt;a href="#summary"
 class="no-underline hidden opacity-50 hover:opacity-100 !text-inherit group-hover:inline-block"
 aria-hidden="true" title="Link to this heading" tabindex="-1"&gt;
 &lt;svg
 xmlns="http://www.w3.org/2000/svg"
 width="16"
 height="16"
 fill="none"
 stroke="currentColor"
 stroke-linecap="round"
 stroke-linejoin="round"
 stroke-width="2"
 class="lucide lucide-link w-4 h-4 block"
 viewBox="0 0 24 24"
&gt;
 &lt;path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" /&gt;
 &lt;path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" /&gt;
&lt;/svg&gt;

 &lt;/a&gt;
 
&lt;/h3&gt;
&lt;p&gt;Max Burstein&amp;rsquo;s post covered the practical Python performance techniques that were most commonly useful in 2013: the approaches that yield meaningful speedups for everyday code without requiring architectural changes. The context was a Python ecosystem where NumPy and Cython were available for numerical work, but pure Python code was often the bottleneck in data processing scripts, web applications, and general-purpose tooling.&lt;/p&gt;</description></item></channel></rss>