|We don't bite newbies here... much|
WorkCrew threadingby FFRANK (Beadle)
|on Jul 24, 2007 at 15:46 UTC||Need Help??|
FFRANK has asked for the
wisdom of the Perl Monks concerning the following question:
Perlthrtut - "In the work crew model, several threads are created that do essentially the same thing to different pieces of data."
Looking for a dummy example of workCrew threading, to be built on.
Something like: 1) take an array of numbers, 2) split it equally between 10 threads (each thread would process 1/10 of the array), 3) do something with those (some sub), 4) return the results into an array (initial positions), 5) return the indice of the initial number that has generated the highest result.
Would the time gain be ~ 10 by using this approach on a single processor (say @array is big)...
Thanks very much,