3 ms·
I haven't used asyncio that much, certainly not in any serious sense, but wouldn't ContextVar lookups be a major factor of performance in serious asyncio code?
by l_theanine 4y ago
I haven't used asyncio that much, certainly not in any serious sense, but wouldn't ContextVar lookups be a major factor of performance in serious asyncio code? Using tasks for things that aren't io-bound seems likely to give a false sense of performance superiority when doing basically nothing.
- willm 4y agoI’d be surprised if context vars are more expensive than a dict lookup or two. But I haven’t profiled. Could be wrong.