How do I parallelize a simple Python loop?

后端 未结 13 1572
北荒
北荒 2020-11-22 11:54

This is probably a trivial question, but how do I parallelize the following loop in python?

# setup output lists
output1 = list()
output2 = list()
output3 =          


        
13条回答
  •  傲寒
    傲寒 (楼主)
    2020-11-22 12:24

    To parallelize a simple for loop, joblib brings a lot of value to raw use of multiprocessing. Not only the short syntax, but also things like transparent bunching of iterations when they are very fast (to remove the overhead) or capturing of the traceback of the child process, to have better error reporting.

    Disclaimer: I am the original author of joblib.

提交回复
热议问题