Python
Python 3.15 Performance: What Actually Got Faster?
See what actually got faster in Python 3.15, including JIT improvements, startup behavior, standard-library optimizations, profiling, and how to benchmark your own code.
On this page
Python 3.15 contains real performance work, but the most useful way to understand it is not to ask for a single “Python 3.15 is X% faster” number.
There is no responsible universal number.
Python 3.15 performance depends on what you run, where you run it, which interpreter build you use, whether the experimental JIT is enabled, how much time your application spends inside native libraries, and whether startup latency or steady-state execution is the problem you actually need to solve.
What changed is more interesting than one headline percentage:
- the experimental JIT is substantially more capable;
- official Windows 64-bit binaries use the tail-calling interpreter;
- explicit lazy imports can reduce unnecessary startup work;
- several standard-library operations are faster;
- a new sampling profiler makes performance investigation easier;
- frame pointers are enabled by default on supported platforms, improving system-level observability.
This article separates those changes so you can decide which ones matter to your workload.
Quick answer
Python 3.15 can be faster than Python 3.14, but not uniformly.
The strongest official JIT results reported for the 3.15 release are:
- 7–8% geometric-mean improvement for the JIT over the standard optimized CPython interpreter on x86-64 Linux;
- 11–12% improvement for the JIT over the tail-calling interpreter on AArch64 macOS.
But individual workloads range from regressions to very large speedups. The release documentation reports benchmark outcomes ranging from roughly 15% slower to more than 100% faster on individual tests.
That wide range is exactly why you should benchmark your own application.
Python 3.15 performance at a glance
| Area | Python 3.14 | Python 3.15 | Why it matters |
|---|---|---|---|
| Experimental JIT | Early-stage, limited code coverage | New tracing frontend, register allocation, more optimizations | More workloads can benefit |
| Startup/import cost | Traditional eager imports by default | Explicit lazy imports | Optional dependencies can be deferred |
| Windows official binaries | Previous interpreter configuration | Tail-calling interpreter on supported 64-bit builds | Platform-specific runtime gains |
| Profiling | Existing tracing/profiling tools | New profiling package + Tachyon |
Easier diagnosis of real bottlenecks |
| Native observability | Depends on build flags/tooling | Frame pointers enabled by default where supported | Better stack unwinding |
| Base64 | Previous implementation | Encoding ~2×, decoding ~3× | Targeted workload gain |
| Base32/Base85 family | Previous implementation | Rewritten C implementations | Very large targeted gains |
| CSV sniffing | Previous implementation | csv.Sniffer.sniff() up to 1.6× faster |
Useful for schema/file discovery tools |
The key phrase in the final column is targeted gain. A faster Base64 decoder does not make an application faster if it rarely decodes Base64.
The biggest runtime story: the upgraded experimental JIT
Python 3.14 made the experimental JIT easier to try in official Windows and macOS binaries.
Python 3.15 makes the JIT considerably more capable.
The 3.15 work includes:
- a new tracing frontend;
- support for more bytecode operations and control flow;
- basic register allocation;
- additional JIT optimizations;
- improved machine-code generation;
- better unwinding support;
- support for a wider variety of Python behavior.
That broader coverage matters because a JIT cannot optimize code it does not understand.
The 3.15 tracing frontend follows actual execution paths rather than relying on the earlier estimation approach. The result is that more real Python code can enter optimized traces.
What do the official JIT numbers really mean?
The release documentation cites pyperformance results showing:
| Platform / comparison | Official result |
|---|---|
| x86-64 Linux, JIT vs standard optimized CPython | 7–8% geometric-mean improvement |
| AArch64 macOS, JIT vs tail-calling interpreter | 11–12% improvement |
| Individual workloads | roughly -15% to >100% |
The geometric mean is useful for comparing a benchmark suite as a whole, but it is not a promise for your service, ETL script, CLI tool, or notebook.
Imagine two applications.
Application A
- pure-Python CPU loops;
- repeated object creation;
- long enough execution to warm hot paths;
- operations supported well by the JIT.
Application B
- waits on APIs and databases;
- spends most compute time in NumPy/native code;
- exits after a few hundred milliseconds;
- imports many packages but performs little Python computation.
The same interpreter change can matter greatly to A and almost not at all to B.
Benchmark your code, not Python in the abstract
You can start with a deliberately simple harness:
from statistics import median
from time import perf_counter
def benchmark(fn, iterations=10_000, repeats=7):
samples = []
for _ in range(repeats):
start = perf_counter()
for _ in range(iterations):
fn()
samples.append(perf_counter() - start)
return {
"best": min(samples),
"median": median(samples),
"worst": max(samples),
}
Then benchmark something representative:
def workload():
values = [n * n for n in range(100)]
return sum(values)
print(benchmark(workload))
This is a demonstration harness, not a replacement for pyperformance, pyperf, or a realistic application benchmark.
Its purpose is to establish the right habit:
Run the same workload, on the same machine, repeatedly, with controlled conditions.
Comparing Python 3.14 and 3.15
On Windows with both versions installed, a simple workflow may look like:
py -3.14 benchmark.py
py -3.15 benchmark.py
On systems where executables are separately named:
python3.14 benchmark.py
python3.15 benchmark.py
For meaningful results:
- Use the same machine.
- Avoid unrelated heavy workloads.
- Use the same dependency versions where possible.
- Warm up long-running workloads.
- Run multiple repetitions.
- Compare medians, not one lucky result.
- Include startup time only when startup matters.
- Measure end-to-end work, not only isolated loops.
- Separate interpreter changes from dependency changes.
- Record the exact Python build and OS.
If you change Python, NumPy, pandas, your compiler toolchain, and your input data simultaneously, you no longer have a useful version comparison.
Test the JIT separately
Do not mix “Python 3.15 vs 3.14” with “JIT vs no JIT” into one result.
Those are two experiments.
A better matrix is:
| Run | Python | JIT |
|---|---|---|
| A | 3.14 | Off |
| B | 3.15 | Off |
| C | 3.15 | On |
That lets you answer two separate questions:
- Did the baseline interpreter/runtime change help?
- Does the experimental JIT help this workload?
If your Python 3.15 build supports the JIT, enable it using the mechanism supported by that build and verify the JIT state before trusting the result.
The operational rule is simple:
Do not enable an experimental runtime feature in production solely because one microbenchmark got faster.
Lazy imports target startup performance, not CPU throughput
One of Python 3.15’s most practical performance features is not part of the JIT at all.
Explicit lazy imports defer module loading until first use:
lazy import json
lazy from pathlib import Path
print("CLI is ready")
def load_config(raw):
return json.loads(raw)
def output_path(name):
return Path(name)
For an application with many optional features, this can avoid import work on execution paths that never need those features.
That makes lazy imports potentially useful for:
- CLI tools;
- serverless functions;
- package-manager commands;
- administrative utilities;
- plugin systems;
- large frameworks with optional subsystems.
Measure import cost directly
Python provides import timing support:
python -X importtime app.py
Use it to identify heavy imports before deciding what to make lazy.
If a module takes noticeable time to import but is always used immediately, making it lazy merely moves the cost. If a heavy dependency is needed by only a small fraction of executions, deferring it can materially improve the common path.
Standard-library improvements can be significant — in the right workload
Python 3.15 contains several targeted standard-library optimizations.
Base64
The underlying Base64 implementation now encodes roughly 2× faster and decodes roughly 3× faster according to the 3.15 release documentation.
That can matter in:
- authentication/token tooling;
- binary-to-text pipelines;
- message processing;
- API gateways;
- MIME-related workflows.
But if Base64 accounts for 0.2% of your application runtime, even a 3× improvement there barely changes total runtime.
Base32 and Base85 families
Parts of the Base32, Ascii85, Base85, and Z85 implementations were rewritten in C, with very large improvements reported for those operations.
Again, this is excellent if your workload uses them heavily and irrelevant if it does not.
CSV delimiter detection
csv.Sniffer.sniff() can now detect delimiters up to 1.6× faster.
This can help tools that repeatedly inspect unknown CSV files:
import csv
with open("incoming.csv", newline="", encoding="utf-8") as file:
sample = file.read(4096)
dialect = csv.Sniffer().sniff(sample)
print(dialect.delimiter)
For a data ingestion system receiving heterogeneous CSV files, this is a real targeted improvement. For a pipeline with a known delimiter configured in advance, it may not matter at all.
Windows gets an important interpreter change
The official Python 3.15 64-bit Windows binaries use the tail-calling interpreter on supported builds.
The 3.15 documentation reports strong pyperformance results for the documented MSVC/Windows test configuration, including a geometric-mean improvement in the 15–20% range compared with the switch-case interpreter on the tested system.
That is significant, but it is still a platform/build benchmark.
Do not turn it into:
Every Python program on Windows is 20% faster.
The responsible interpretation is:
The official Windows runtime itself changed in a way that can produce meaningful pure-Python performance gains, so Windows users have a particularly good reason to benchmark 3.15.
Profiling got better, which can matter more than raw speed
Making Python faster is useful. Finding out why your application is slow is often more valuable.
Python 3.15 introduces the profiling package and Tachyon, a high-frequency statistical sampling profiler.
Tachyon is designed to inspect running Python processes with sampling rather than instrumenting every function call.
Its capabilities include:
- profiling an existing process by PID;
- launching and profiling a script;
- profiling modules;
- CPU-time sampling;
- wall-clock sampling;
- GIL-holding analysis;
- exception-focused sampling;
- thread-aware and async-aware operation;
- flame-graph and heatmap-oriented output.
This changes the performance workflow from:
guess
→ optimize
→ hope
into:
measure
→ locate hot path
→ optimize
→ measure again
That is a bigger engineering improvement than a few percent of interpreter speed.
Frame pointers improve system-level observability
CPython 3.15 is built with frame pointers enabled by default on platforms that support them.
This helps native stack unwinding for:
- system profilers;
- debuggers;
- crash-analysis tools;
- eBPF-based observability.
For most application developers this is invisible. For platform engineers and performance engineers working across Python and native extensions, it can make profiling far more reliable.
Performance is not only “how fast does the code run?” It is also “how quickly can I explain where the time went?”
What about free-threading?
Free-threaded Python continues to evolve, and Python 3.15 adds important stable-ABI and C-API work for free-threaded builds. Official macOS binaries also install free-threading support by default.
But free-threading is a concurrency story, not a blanket single-threaded performance promise.
It matters when:
- your application can exploit CPU parallelism;
- your dependencies are compatible;
- the workload is appropriate;
- you understand the difference between normal and free-threaded builds.
Do not combine free-threading, JIT, and standard CPython into one benchmark and call the result “Python 3.15 performance.” Treat them as distinct runtime configurations.
What Python 3.15 performance means for data engineers
Data engineering workloads are easy to misinterpret because “Python job” does not necessarily mean “Python does most of the work.”
PySpark
In a PySpark job, substantial work executes inside Spark’s distributed engine and JVM processes.
Making the Python driver slightly faster may help orchestration, serialization, UDF-heavy patterns, or driver-side logic, but it does not mean a one-hour Spark SQL transformation suddenly becomes 8% faster.
And a managed Spark environment must explicitly support Python 3.15 before any of this is relevant.
pandas and NumPy
Many expensive pandas and NumPy operations spend much of their execution time in optimized native code.
Interpreter improvements can still help surrounding Python logic, but benchmark the actual pipeline.
ETL and orchestration
Pure-Python orchestration code may benefit more directly, especially when it:
- manipulates metadata;
- performs many small transformations;
- starts frequently;
- imports large dependency trees;
- uses encoding/decoding heavily;
- processes heterogeneous text files.
Serverless and short-lived jobs
Startup improvements can be more important than steady-state throughput.
For a job that runs for a fraction of a second, saving import work can matter. For a process that runs continuously for days, the same saving is largely irrelevant.
Performance relevance by workload
| Workload | Likely relevance of Python 3.15 runtime changes |
|---|---|
| CLI/startup-heavy applications | High potential |
| Pure-Python CPU loops | Worth benchmarking carefully |
| Long-running web APIs | Workload-dependent |
| Serverless functions | Startup improvements can matter |
| pandas/NumPy vectorized workloads | Often less dominated by interpreter speed |
| PySpark transformations | Much work executes outside CPython |
| I/O-bound automation | Usually modest runtime impact |
| Base64-heavy processing | Targeted stdlib gains may matter |
| CSV discovery/ingestion tooling | Faster delimiter sniffing can help |
| Native-extension-heavy apps | Dependency behavior matters more than headline CPython numbers |
A practical benchmark plan
If I were evaluating Python 3.15 for a production service, I would use this sequence.
1. Record the baseline
Capture:
- Python 3.14 patch version;
- OS;
- CPU;
- dependencies;
- application configuration;
- representative inputs.
2. Move only Python first
Create a Python 3.15 environment with otherwise equivalent dependencies and run the same test suite.
3. Measure startup separately
For CLIs or short-lived applications, measure process startup and import cost separately from steady-state work.
4. Measure end-to-end scenarios
Benchmark business operations, not only utility functions.
Examples:
- process 10,000 records;
- execute one complete API request flow;
- load and validate a representative file;
- generate one full report;
- run a complete local ETL step.
5. Test the JIT as a separate variant
Compare 3.15 baseline against 3.15 JIT-enabled.
6. Profile before optimizing
Use profiling tools to determine whether Python execution is actually your bottleneck.
7. Repeat
Run enough samples to distinguish a real improvement from system noise.
Should performance alone make you upgrade?
Usually, no.
Performance is one input. A production Python upgrade also depends on:
- dependency support;
- deployment image support;
- CI support;
- native extensions;
- observability tooling;
- runtime compatibility;
- operational risk.
But Python 3.15 is an unusually interesting release to benchmark because several independent performance areas moved forward at once:
- JIT;
- Windows interpreter configuration;
- lazy imports;
- standard-library hotspots;
- profiling;
- native observability.
Even if your application gets only a small runtime gain, the improved ability to measure and diagnose it may still justify the upgrade.
Final takeaway
The best way to describe Python 3.15 performance is:
Python 3.15 creates more opportunities for performance improvement, but you still have to measure which ones apply to your workload.
The experimental JIT is substantially more capable than in 3.14. Lazy imports attack startup cost directly. Several standard-library operations received targeted speedups. Windows binaries gained an important interpreter change. Profiling and native-stack observability improved.
But there is no universal “Python 3.15 is X% faster” result.
Benchmark the thing your users actually wait for.
For the adjacent upgrade decisions, read the direct Python 3.15 vs 3.14 comparison. For the longer release arc, use the Python 3.11 to 3.15 upgrade guide.
Official references
- Python 3.15.0 release: https://www.python.org/downloads/release/python-3150/
- What’s New in Python 3.15: https://docs.python.org/3.15/whatsnew/3.15.html
- What’s New in Python 3.14: https://docs.python.org/3.14/whatsnew/3.14.html
- PEP 810 — Explicit lazy imports: https://peps.python.org/pep-0810/
- PEP 799 — Profiling package / Tachyon: https://peps.python.org/pep-0799/
- PEP 831 — Frame pointers by default: https://peps.python.org/pep-0831/
Was this helpful?
What could be better?
Thanks — that helps me improve Javi Builds.
Continue learning
- Cheat sheetInspect a pandas DataFrameInspect a pandas DataFrame quickly and safely to understand its shape, columns, data types, nulls, duplicates, distributions, and suspicious values before transforming data.Open cheat sheet
- ArticlePython 3.15 vs 3.11: What Changed and Should You Upgrade?See what changed from Python 3.11 through 3.15, which features arrived in each release, what may break, and how to plan an upgrade.Read article
What should I build next?
I'm building Javi Builds around practical problems data engineers actually face. Tell me what you'd like to see next.
Stay in the loop
Get the Javi Builds updates you actually care about.
Check your inbox
I sent you a confirmation link. Your subscription will be active after you confirm it.