in reply to Re^4: Multythread script. The best way.
in thread Multythread script. The best way.
I need to distribute cpu-intensive numerical calculations over multiple cores. In fact it is not math calculation rather it is check for compliance with a number of attributes (about 100).
Then forget Coro, or the event driven frameworks.
Concentrate on threads and Parallel::ForkManager.
The decision between those two is: in part elective; in part platform dependent; but mostly will centre upon the details of your iterations.
eg. if the logical approach is to run 100 passes (not all concurrently) over the entire dataset I might use one approach. On the other hand if it makes more sense to perform 1 pass over each of a number of subsets I'd use another.
I'd need more info to choose which.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Multythread script. The best way.
by builat (Monk) on Nov 02, 2013 at 09:01 UTC |