Hello, 
I think that if N is too large and the computation load of @spawn is too 
small then the overhead of creating and dispatching the tasks outweighs the 
gain of parallelization.
You can try @parallel, which distributes loop iterations across different 
workers.

f(i) = T(i)
@parallel for i in 1:N
 v[i] = T(i)
end

Other options include to use pmap instead of map, or to use @async, but I 
didn't see any improvement in this case.

Regards,
Germán.

Reply via email to