# The Upgrade Halved Four Numbers and Made Three Worse

> From 3.10 to 3.15, reads and calls land at 0.46x to 0.54x. A coroutine object is 1.79x bigger, get_type_hints is 1.40x slower and importing asyncio costs 1.40x more.

- Published: 2026-11-01
- Category: runtime
- Tags: versions, benchmarking
- Sources: https://github.com/CognatePress/erperiments.pydepth.com/blob/main/upgrade/from310.py, https://peps.python.org/pep-649/
- Source: https://pydepth.com/blog/upgrade-from-310/
- Language: en-US
- Author: Elliot Sayer

---
Python 3.10 reached end of life in October 2026, and the developer guide has said so since
before it happened. The argument for staying is that an upgrade is risk without upside. The
upside half of that is a claim about performance, and it is a claim nobody in the argument
usually has a number for.

This archive has six harnesses that have been printing numbers for a year. Run them unchanged
on 3.10.21 and on 3.15.0rc1 and four things get about twice as cheap, three get worse, and two
do not move at all.

## Every harness, both interpreters

The runner takes two interpreter paths, runs each of the six harnesses under both, prints all
twelve outputs in full and then the comparison. Which line of which harness produced each row
is written out in the `PICKS` list in the source, so the extraction is auditable rather than
asserted. The comparison, which is the last block of that output:

```
$ python3 experiments/upgrade/from310.py /opt/homebrew/bin/python3.10 \
    ~/.pyenv/versions/3.15.0rc1/bin/python3
what moved between 3.10.21 and 3.15.0rc1

measurement                 harness                   3.10.21   3.15.0rc1      change
instance with a dict        objshape/sizes.py             152          96  bytes 0.63x better
instance with slots         objshape/sizes.py              56          56  bytes same
read through a dict         objshape/access.py          10.24         4.7  ns    0.46x better
read through slots          objshape/access.py           9.05        4.72  ns    0.52x better
modules at startup          importtime/cost.py             52          33        0.63x better
import asyncio              importtime/cost.py           17.5        24.5  ms    1.40x worse
modules it adds             importtime/cost.py             79         115        1.46x worse
8 threads, CPU-bound        gil/scaling.py                  1        0.96  x     0.96x worse
8 threads, IO-bound         gil/scaling.py               8.06        7.98  x     same
a plain call                asynccost/calls.py             50          25  ns    0.50x better
await a Task                asynccost/calls.py          30549       28817  ns    0.94x better
gather, 1000 wide           asynccost/calls.py           2657        1561  ns    0.59x better
a coroutine object          asynccost/calls.py            112         200  bytes 1.79x worse
annotations evaluated       typehints/runtime.py            1           0        1 to 0
read __annotations__        typehints/runtime.py           35          30  ns    0.86x better
get_type_hints()            typehints/runtime.py          3.5         4.9  µs    1.40x worse
call an annotated function  typehints/runtime.py        30.33       16.28  ns    0.54x better
```

Anything inside 2% is printed as `same` rather than given a direction. Two of these rows are
thread-scaling ratios that move by a percent between runs of the same binary, and reading that
as a finding would be reading noise.

## What got twice as cheap

The four rows at 0.46x to 0.54x are all the same kind of thing: an operation the interpreter
performs, with no library underneath it. A plain function call, a read through an instance
dictionary, a read through a slot, a call to a function that carries annotations.

Those are the operations a Python program does hundreds of millions of times without
noticing, and they are half the price they were. The instance-memory row belongs with them:
152 bytes to 96 for a three-field object, which is the inline values layout that arrived in
3.11 and is the same mechanism
[the archive measured in detail on 3.13](/blog/the-shape-of-a-python-object/).

The annotated-call row is the one to read twice. On 3.10 an annotated function costs 30.33 ns
against 30.43 for an unannotated one, and on 3.15 it is 16.28 against 16.16. Annotations were
already free at call time on both, and they still are. What halved is calls in general, and the
annotated row is in the table because it is the row a reader is most likely to misattribute.

## What got worse

A coroutine object is 112 bytes on 3.10 and 200 on 3.15, which is 1.79x. That is the largest
single regression in the table and the only one that scales with what a program holds rather
than with what it does. `await` on a Task moved barely at all (0.94x), and `gather` over a
thousand coroutines got substantially cheaper (0.59x), so the async machinery is faster and the
objects it manages are bigger.

`typing.get_type_hints()` went from 3.5 to 4.9 microseconds. Reading `__annotations__` directly
got cheaper, from 35 ns to 30. The expensive path got more expensive and the cheap path got
cheaper, which is a reasonable trade for a function that most programs call at import time and
never again — and a bad one for a framework that calls it per request.

The `annotations evaluated` row is not a performance number at all. On 3.10, defining a class
evaluates one annotation expression; on 3.15 it evaluates zero. That is PEP 649 landing, and it
changes when a bad annotation raises rather than how fast a good one runs.

## What the import rows are not saying

`import asyncio` costs 17.5 ms on 3.10 and 24.5 on 3.15, and reading that as a 40% regression
would repeat [the mistake this archive has already
measured](/blog/import-time-is-not-import-cost/). The two interpreters do not start
from the same place: the bare 3.10 process holds 52 modules and the bare 3.15 process holds 33.

The `cumulative` column charges an import for whatever it pulled in first, so an interpreter
that pre-loads less makes every subsequent import look dearer. The number that survives the
difference is the total: after `import asyncio`, 3.10 holds 131 modules and 3.15 holds 148.

That is still more, and 17 modules is a real difference. It is not 40%.

The startup row moves the other way for the same reason and is a genuine win: 52 modules to 33
means a process that imports nothing at all begins with a third less of the standard library
resident, which is where a short-lived command gets its time back.

## Where to stop

One machine, macOS on Apple silicon, 3.10.21 from Homebrew against 3.15.0rc1 built from source
on 2 September 2026. The final 3.15 is dated 1 October and is not what was measured.

Every row is a microbenchmark. None of them is a request, a query, a template render or a
serialisation, and a service whose time goes to a database will not see any of these ratios in
its p99. What the table supports is that the interpreter's own primitives are about twice as
cheap, that three specific things cost more, and that the memory one is the only regression
that grows with load.

The intermediate releases are not here. The two ends were chosen because the decision is about
the two ends, and the harness takes any two interpreter paths if the walk is the question.
