When I compute function outputs with a mass of independent varying inputs, I used Pool for parallel computing and wrote code like
num_cores = int(multiprocessing.