You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Louis Maddox edited this page Feb 7, 2021
·
1 revision
In my experience, Python multiprocessing is more efficient, and you should use
mp.Process not mp.Pool (Pool only seems to assign 4 cores, whereas Process
can use all).
Process is most efficient when all cores are assigned a single Python process,
which does not have to share it with others. You see that when using
more Processes than there are cores on your machine (multiprocessing.cpu_count())
the speed decreases (the time to compute the same thing increases).
Pool is still a decent approach compared to sequential code (which will only use 1 core)