79174246

Date: 2024-11-10 06:20:08
Score: 1.5
Natty:
Report link

Many people claim that asyncio should be used for I/O-intensive tasks. However, this might not actually be the case. I wrote a simple benchmark and observed that for I/O-intensive tasks, the performance of asyncio and multithreading is quite similar. In fact, I believe that asyncio might only be necessary when dealing with very complex state sharing and contention. Otherwise, if using asyncio significantly affects the coding style, it’s best to avoid it.

Reasons:
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Jannchie