Tags
profiling
2 posts
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.