Multiprocessing.Pool makes Numpy matrix multiplication slower

后端 未结 8 2017
感动是毒
感动是毒 2020-11-27 20:05

So, I am playing around with multiprocessing.Pool and Numpy, but it seems I missed some important point. Why is the pool version much

8条回答
  •  抹茶落季
    2020-11-27 20:43

    By default, Pool only uses n processes, where n is the number of CPUs on your machine. You need to specify how many processes you want it to use, like Pool(5).

    See here for more info

提交回复
热议问题