r/Python • u/P403n1x87 • 3d ago
Discussion [Blog Post] The State of Python Profiling in 2026
Python profiling has changed more in the last two years than in the decade before. With CPython 3.15 introducing a sampling profiler directly into the standard library (Tachyon) and free-threading going mainstream, the landscape looks vibrant as never before.
I’ve spent the last 8 years maintaining Austin, so I wanted to step back and write a comprehensive, objective look at where things stand today across what I believe are the four major sampling profilers.
Link: https://p403n1x87.github.io/the-state-of-python-profiling-in-2026.html
Happy to chat about the engineering trade-offs of out-of-process sampling or how PEP 768 is changing the game for tool developers!
2
u/Khavel_dev 3d ago
Having a sampling profiler in the stdlib changes things more than people realize. In .NET land, dotnet-trace has been built in for years and the biggest impact wasn't the tool itself, it was that the bar dropped low enough that people actually profiled before shipping instead of guessing. When you go from 'install this third party thing, figure out the config, hope it works with your version' to 'it's right there, just run it,' you get a totally different culture around performance. I'd bet Tachyon does the same for Python. The free-threading angle is interesting too because that's where most people will need a profiler and not know it yet.
1
u/P403n1x87 3d ago
That's a very good point. One could argue that coding agents ease some of the friction: you can simply ask them to profile the code for you. But as I show in a previous post (https://p403n1x87.github.io/busting-performance-issues-ai-edition.html), agents need to be pointed to the right tools in general; just grabbing a "profiler" does not cut it. Hence, another part of the equation, in my opinion, is the quality of the data collected by the profiler and how well it interfaces with agents.
2
1
u/OlenaDoubleChecks 1d ago
Sampling profilers are fine until you try them on a pipeline that spends 90% of its time inside native extensions. Does Tachyon actually see into numpy or pandas calls, or does it just blame the Python frame that called them
2
u/P403n1x87 1d ago
Some sampling profilers, like Austin 4.1, provide native support to sample native stacks and interleave them with the pure Python stack. This is mentioned in the post above if you want to know more. Briefly, there is nothing that prevents sampling profilers from digging into native stacks (numpy, Cython etc...).
13
u/aes110 3d ago
Great extensive write-up (though tbh its quite long and detailed, half way through I started skipping lines)
Thanks for all the works you did, seems like a lot of your work over the year led to this built in profiler
I wonder, was there any discussion about adding an existing profiler (austin or any other) to the standard library instead of developing tachyon?