01
Very little changes for most developers; the new profiler is a minor update to Python's performance tools.
Python 3.15 includes a new tool to analyze program performance, which may help developers find inefficiencies faster than older tools.
A minor update to Python's performance tools offers limited benefits for most developers, with no major impact on competition or cost.
Python 3.15 introduces a new profiler that addresses gaps in cProfile, offering more detailed performance insights for code optimization.
02
Python 3.15's lazy imports can cut CLI startup time caused by heavy dependencies, and dropping 3.10 lets maintainers use 3.11 features like TaskGroup and tomllib.
Python has released version 3.15, its newest edition of the popular programming language. Its standout addition is 'lazy imports,' which delays loading bulky add-on libraries until they are actually needed, making tools start faster. It also adds a built-in profiler, a diagnostic tool that watches a running program and reports where it spends time. Because the newest release retires the oldest supported one, software maintainers can now rely on conveniences added in version 3.11.
Python 3.15 ships with explicit lazy imports (PEP 810), letting projects like Simon Willison's LLM CLI avoid multi-second startup penalties from heavy dependencies like sentence_transformers. A new sampling profiler, Tachyon, is now in the standard library. Performance is largely unchanged from 3.14, though the experimental JIT delivered its first meaningful 1.2x speedup in Miguel Grinberg's tests. Teams supporting all supported versions can now drop Python 3.10, released 2021, and use 3.11 features.
Python 3.15 adds PEP 810 explicit lazy imports (`lazy import json`), deferring module loading to first use, useful for plugin systems where installing heavy packages like sentence_transformers previously slowed the llm CLI's startup. PEP 798 enables unpacking in comprehensions: `[*L for L in lists]`. cProfile is renamed profiling.tracing, joined by the Tachyon sampling profiler (profiling.sampling), attachable via PID and exporting flame graphs. Miguel Grinberg found 3.15 roughly equal to 3.14, with the JIT giving 1.2x on a Fibonacci test. With 3.10 EOL, sqlite3 adds setlimit/getlimit, create_window_function, blobopen, and set_authorizer(None).
03
Python developers can now see exact function-level timing and call order for slow code without guesswork, using a free open-source tool with low runtime overhead.
VizTracer is a free, open-source tool that records what a Python program actually does as it runs. It tracks which functions execute, the order they run in, and how long each takes, then displays the results in Perfetto, a visual timeline viewer originally built for system tracing. This replaces the common practice of adding print statements and guessing at slowdowns. The tool is available now on GitHub for anyone debugging Python performance.
VizTracer gives engineering teams a free alternative to paid profilers for diagnosing slow Python services, cutting the time spent hunting performance bugs. The project is maintained by developer gaogaotiantian and lives on GitHub, so adoption carries no licensing cost. The article provides no benchmark figures, pricing comparisons, or adoption numbers, so the business case rests on the tool being open source and immediately available.
VizTracer instruments Python execution to log function entry, exit, and duration with low runtime overhead, though the article does not quantify the overhead percentage. Trace output can be visualized in Perfetto, Google's system-trace viewer, giving an interactive flame-graph-style timeline of call sequences. The project is hosted at github.com/gaogaotiantian/viztracer. The article omits overhead numbers, supported Python versions, and comparison against cProfile or py-spy.
04
Python developers can now find real slowdowns, including I/O and async waits, with minimal profiling overhead instead of misleading cProfile output.
Pyinstrument is a free profiling tool for Python, the popular programming language. A profiler measures which parts of a program are slow, but standard tools add heavy slowdowns and bury you in data. Pyinstrument instead samples what the code is doing every millisecond, producing a short, readable list of where time actually goes, including time spent waiting on networks or files. Anyone who writes Python, especially web or data work, can use it.
Pyinstrument is a free, open-source Python profiler that a team can adopt today at zero cost and even run briefly in production without noticeable performance impact. It competes with the built-in cProfile by trading exhaustive detail for readability and low overhead, showing wall-clock time rather than CPU time. Engineering teams with slow web servers or data pipelines gain faster diagnosis; no vendor, pricing or licensing risks are mentioned, and no benchmark comparisons are given.
Pyinstrument is a statistical profiler that samples the call stack every millisecond by default rather than instrumenting every call, yielding low overhead and wall-clock (not CPU-time) results that capture I/O and sleep waits. It handles async/await code, multi-threaded programs, PyPy and Jupyter. Output includes console trees, interactive HTML flame charts, JSON and speedscope formats. The article gives no benchmark numbers, version, or overhead measurements versus cProfile.
05
Code optimization makes programs run faster. Measuring speed helps fix slow parts. This improves overall performance and efficiency.
Optimizing code performance is crucial for business efficiency. Measuring code speed helps identify bottlenecks. Data-driven decisions improve productivity.
cProfile and SnakeViz are used to measure code performance. These tools identify slow paths in Python code. Optimization techniques improve execution speed.