2 ms·
> Python introduced a concept, async/await, to help developers write understandable code with high performance is it actually better or is it just a new kind of
by 32gbsd 7y ago
> Python introduced a concept, async/await, to help developers write understandable code with high performance
is it actually better or is it just a new kind of threading/loop? being understandable is second fiddle.
- crazyguitar 7y agoasync/await is a better design pattern without considering low-level APIs such as epoll. It is not a new kind of threading/loop. Python provides a user-level scheduler for developers, so they don't need to implement their scheduler from scratch. In my opinion, the reason why using an event loop can acquire better performance is to decrease the number of times to lock some critical sections. Also, this pattern can increase the cache hit and mitigate CPU context switch frequency.
- gigatexal 7y agoI think C# had it long before python did...