Category 03
Tooling
What the toolchain does at build, import or check time — import graphs, annotation resolution, profilers, benchmark harnesses, packaging.
- Entries
- 3
- Series
- 2
cProfile Slowed It 2.9x and Moved the Ranking by One Point
cProfile adds a flat 25 to 30 ns to every call it observes. That inflates a 47 ns function's reported time by 1.57x and a one-microsecond function's by nothing at all.
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.
Type Hints at Run Time
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.