You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not really a code bug but I'm curious how this gem is slicing up the problem set. Maybe updating the readme with this information will be helpful to others later
I.e. if I say
Parallel.map((1..100), :in_processes => 20) do | item |
...
end
Does this create a worker pool of 20 processes that as they finish an iteration they go and grab the next item and run the loops contents for that item?
Does it map a range of values to each process (process 1 gets items 1-5, process 2 gets items 6-10, ...)?
Some other way
In my code I'm dealing with a shifting window problem where i have to also change the size of the window so I'm dealing with nested loops. The last iteration of my top loop has the least possible window sizes so it runs the fastest but the first iteration has the most possible window sizes so it runs the slowest. If you're using the first way of splitting up the problem set then it works fine for my code but the second way would mean I'm not getting quite as much performance.
There could be other problems though where the second method would be faster because of the lower overhead.
The text was updated successfully, but these errors were encountered:
Not really a code bug but I'm curious how this gem is slicing up the problem set. Maybe updating the readme with this information will be helpful to others later
I.e. if I say
Parallel.map((1..100), :in_processes => 20) do | item |
...
end
In my code I'm dealing with a shifting window problem where i have to also change the size of the window so I'm dealing with nested loops. The last iteration of my top loop has the least possible window sizes so it runs the fastest but the first iteration has the most possible window sizes so it runs the slowest. If you're using the first way of splitting up the problem set then it works fine for my code but the second way would mean I'm not getting quite as much performance.
There could be other problems though where the second method would be faster because of the lower overhead.
The text was updated successfully, but these errors were encountered: