如何提高多进程性能?

时间:2019-01-17 14:39:52

标签: python-3.x performance python-multiprocessing

我需要进一步提高python应用程序的性能。 我刚刚将“多进程”库(多处理的叉子,因为我需要莳萝)用于以下代码:

p = multiprocess.Pool(multiprocess.cpu_count()) # 64 cores
result = p.map(my_function, myargsinlist)
p.close()
p.join()

这是CPU性能的图形: actual code

我该怎么做呢? (请参阅红线以了解目标) enter image description here

0 个答案:

没有答案