The ecosystem is full of examples like this - orjson is much faster than the json module, structlog can be configured to be much faster than logging, etc. Not everything needs to be in the standard library, where it incurs a maintenance burden on the core devs.
Python is designed with extensibility in mind! If you’re aiming for better performance, consider using uvloop, an ultra-fast event loop for asyncio. For additional performance-focused tools, explore libraries like simdjson and similar options.
I agree with the responses here. I guess I’m hoping for more confirmation regarding uvloop specifically.
I guess I thought that switching the event loop implementation to uvloop wouldn’t be a breaking change (since it’s a “drop in replacement”). I hadn’t considered that, just because it’s API is identical doesn’t mean it is not a maintenance burden
Aye, it’s the external dependency on libuv that we don’t want to bring into the core interpreter. As a third party module, uvloop can be updated as needed to harmonise different versions of libuv with different versions of Python, but if it’s directly in the standard library, everything gets more annoying to keep aligned.
I’ve been working on an async I/O engine for Zig for the last year, and took a quick detour and implemented an asyncio evet loop based on the core of the engine. It’s about 10% faster than uvloop in most networking benchmarks (due to running on io_uring by default, and having less abstractions than libuv → uvloop → asyncio), and also faster at raw callbacks/tasks, but along the way I realized it does not really care, because the moment you add a Python framework, the performance gets significantly reduced. The only reason for me bringing the project to an usable state was that it also has async file I/O, which is currently hard to get on asyncio otherwise.