Hi experts,

I have a question about pprocess module.

When I use:

 

time1 = time.time()

results = pprocess.pmap(calculate, sequence, limit=limit)

time2= time.time()

# Show the results.

for result in results[i*N:i*N+N]:

pass

time3 = time.time()

 

I found

time2 - time1 = 0.8 seconds,

but time3 - time2 = 7 seconds.

calculate the results is very fast, but when I use for loop to get the
result from the results, it's slow, why?

Does anyone know this? very thanks.

 

 

 

Best

Regards,

 

Xiao Peng

 

_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to