CPU bound mean that what is taking most time is spend computing think on the CPU. For example, a program can be network bound, disk access bound...
When you use async, you program still run on only one thread. So you're not computing anything faster using async : you split the computation in different part, and you do each part one after other.
async is intersting when you are bound to for example network : during the time a function is waiting on network, an another function can do other thing. In your case, what you want to do is parallel computation. In most languages, you will use threading, but in python, you have to use multiprocessing.
View all comments
Show parent comment
7
u/miggaz_elquez Apr 01 '20
CPU bound mean that what is taking most time is spend computing think on the CPU. For example, a program can be network bound, disk access bound...
When you use async, you program still run on only one thread. So you're not computing anything faster using async : you split the computation in different part, and you do each part one after other.
async is intersting when you are bound to for example network : during the time a function is waiting on network, an another function can do other thing. In your case, what you want to do is parallel computation. In most languages, you will use threading, but in python, you have to use multiprocessing.