Asynchronous processing is more efficient -- surely not?

Jan Erik Moström lists at
Wed Apr 4 06:28:15 EDT 2018

On 4 Apr 2018, at 9:27, Steven D'Aprano wrote:

> Its as hard to wrap your brain around as parallel processing in 
> general,
> but with even worse performance than sequential processing.
> Am I totally wrong?

I would say that it all depends on what kind of stuff you're doing. I'm 
no scheduling expert but our high performance centre run their jobs in 
batch mode, every job is allowed to finish before it removed from the 
processor (assuming they keep inside their time quota) but they are 
hight compute intensive jobs with little I/O.

On the other hand, a desktop computer probably have "reactive jobs" with 
a high ratio of I/O which would make it desirable to have threads/async 

Other systems are probably between these two cases. So saying that it's 
always good is probably not true but sometimes it can be a win.

Also, assuming you have threads/processes and a multicore system the 
scheduling might take advantage of this giving higher performance ... 
I'm haven't thought about how co-routines would work here.

(another plus for threads is that *I* think that the logical 
division/coding of the system becomes easier if threads and IPC is used 
... but I don't have any data to support this - and yes I know that 
threads/processes/synchronization open up its own can of worms)

= jem

More information about the Python-list mailing list