Jun-19-2019, 12:21 PM
Hi,
first, multiprocessing is no guarantee that something runs faster. It is very likely to run faster on CPU bound problems, but not always.
The time per process per CPU is set by the underlaying OS. Thus, if you want your processes to have more CPU-time, you need to give them a higher priority from the OS side.
Second, multiprocessing creates some overhead setting up the processes, thus of the overall process run relatively short, multiprocessing may be slower due to that.
Third, the
What are the actual run times of our code?
By the way:
Regards, noisefloor
first, multiprocessing is no guarantee that something runs faster. It is very likely to run faster on CPU bound problems, but not always.
The time per process per CPU is set by the underlaying OS. Thus, if you want your processes to have more CPU-time, you need to give them a higher priority from the OS side.
Second, multiprocessing creates some overhead setting up the processes, thus of the overall process run relatively short, multiprocessing may be slower due to that.
Third, the
chunksize
may be unfavorably chosen.What are the actual run times of our code?
By the way:
eval
is a bad name for a function, as it overrides the build-in function eval
?. Which may have very "funny" side effects. Better change the name of your function.Regards, noisefloor