Tags
profiling
3 posts
timeit Turns the Collector Off, and That Is Worth 2.07x
With the garbage collector disabled the cyclic implementation wins by 4%. With it enabled the same code loses by 2.07x. timeit reports the first number, always.
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.