Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Python Threading Beginners Tutorial [video]. Parent comment
Multiprocessing allows you to use all cores, but you can't share memory like in threads. So you have to Serialize/Deserialize a lot for exchange data.
If your serializations cost are low and need computation power, you should use multiprocessing. If you are just waiting I/O you can use threads.
BTW, modern python "ProcessPoolExecutor" is not designed for compute heavy batch like "Pool" from "multiprocessing".
There are no comments on this comment yet.
Multiprocessing allows you to use all cores, but you can't share memory like in threads. So you have to Serialize/Deserialize a lot for exchange data.
If your serializations cost are low and need computation power, you should use multiprocessing. If you are just waiting I/O you can use threads.
BTW, modern python "ProcessPoolExecutor" is not designed for compute heavy batch like "Pool" from "multiprocessing".