Re: processing a huge array
[email protected] (Uri Guttman)
| Newsgroups | perl.loop |
|---|---|
| Message-ID | <[email protected].> |
>>>>> "JS" == John Saylor <[email protected]> writes: JS> I want to use Event.pm to increase performance by doing a JS> parallel-ism thing. Basically, rather than run through an array JS> member by member, I'll split- er splice the array into smaller JS> arrays and process the smaller arrays all at the same time, each JS> with it's own event handler. unless you run multiple processors, you can't get any speed up of number crunching code from parallelism. if you do have multiple cpu's then you could fork procs and use some IPC method to coordinate your crunching. you may want to analyze your program to see if it is cpu or disk bound as well. if it is disk bound, then parallelism could help even on a single processor. JS> Right now I am using the timer flavor to start up several event JS> handlers that will splice the array then process the bits that are JS> pulled out. I'm not sure this is the best way to do it. JS> Any suggestions or pointers? If my description is too generic let JS> me know and I can add onto it. i am not clear on your project needs or goal. uri -- Uri Guttman --------- [email protected] ---------- http://www.sysarch.com SYStems ARCHitecture and Stem Development ------ http://www.stemsystems.com Search or Offer Perl Jobs -------------------------- http://jobs.perl.org