Oct-10-2019, 08:50 AM
Hi everybody,
I am using this portion of code with a "for loop" and zip in two different but rather equivalent context :
I write this script on top of the DAPPER package so I do not expect you to reproduce the case, nor to solve it, just giving me ways to understand why these results can be so different.
Any help would be highly appreciated :)
I am using this portion of code with a "for loop" and zip in two different but rather equivalent context :
result = multiproc_map(local_analysis, state_batches) for ii, (ATii,muii) in zip(state_batches, result): AT[:,ii] = ATii mu[ii] = muiiIn each case the shape local_analysis is the same function and state_batches, ii, ATII and muii are the same and have the same shape but the time of execution in seconds of multiproc_map and the "for loop" is really different in the 2 cases :
Quote: Time of execution of multiproc_map : 9.5367431640625e-07 4.069389343261719
Time of execution of the "for loop": 13.779568910598755 0.0259706974029541
I write this script on top of the DAPPER package so I do not expect you to reproduce the case, nor to solve it, just giving me ways to understand why these results can be so different.
Any help would be highly appreciated :)