
Tooling
Swapping Two Imports Moved 5.5 ms to a Different Module
Importing logging before asyncio moves 5.5 ms from asyncio's line to logging's. The program does the same work. The cumulative column charges whoever got there first.
Python internals, measured · Elliot Sayer
Python, its runtimes, frameworks, and the systems beneath them — read from source, measured, not assumed.

Tooling
Importing logging before asyncio moves 5.5 ms from asyncio's line to logging's. The program does the same work. The cumulative column charges whoever got there first.

Runtime
A lazy import of asyncio costs no measurable time and no modules at startup. Read the name once and 26.4 of the 26.8 ms come back. Deferral is not removal.

Runtime
On CPython 3.10 a NamedTuple attribute read cost 0.81x a read through an instance dictionary. On 3.11 it costs 1.90x. Nothing about NamedTuple changed.

Runtime
sys.getsizeof reports 296 bytes for a class's first instance dict and 96 once twenty-six exist. The instance itself costs 96 bytes and getsizeof says 48.

Runtime
A read through __slots__ costs 24% more than one through an instance dictionary on CPython 3.13.2. Rebuild the same version and the gap goes away.

Tooling
Annotations cost nothing per call and everything at import. Reading __annotations__ takes 24 ns; resolving the same class with get_type_hints takes 3.4 µs, 140x more.
Browse
Four pillars. Every entry answers the question of exactly one of them.
What CPython does with the objects, modules and frames you hand it — object layout, the import system, the eval loop, memory behaviour.
What is actually parallel, and what the scheduling costs. Threads, the GIL, free threading, asyncio, subinterpreters and processes.
What the toolchain does at build, import or check time — import graphs, annotation resolution, profilers, benchmark harnesses, packaging.
Django, FastAPI and SQLAlchemy measured inside a real request rather than in the quickstart, counted in queries and milliseconds.
4 entries
What CPython actually does with the objects, modules and threads you hand it — measured on a real interpreter rather than argued from the docs.
2 entries
What an import costs, who gets charged for it, and what deferring it actually moves — measured on the interpreter that shipped the feature.