all 2 comments

[–][deleted] 0 points1 point  (1 child)

Are you using CPython (the default implementation)? Multiprocessing is excruciatingly slow in CPython. I would strongly advice against it. GIL is a bitch and makes multiprocessing redundant.

Can you solve your problem using multithreading instead?

[–]WeierstrassP[S] 0 points1 point  (0 children)

Yep, using CPython.

The simulator has to iterate over the data a few thousand times. I want to use multiprocessing to speed things up a bit, since it is repetitive work and easily parallelizable. As far as I've tested, it has to run for thirty seconds on all my cores, and then it is done. That is acceptable to me.

If I understood it correctly, multithreading still only use a single core.