in reply to Re^5: unix loops in perl
in thread unix loops in perl

You can certainly pull from multiple places, but once you've saturated your network, more connections won't help.

If you do the work in a loop, you only use one process. If you create new processes and have each process do a portion of the work, then you create new processes. I don't see where that gets confusing.


When I say 'each process takes up very little', I mean when it is easy for your process to just do the job itself. You've seen the classic extreme case of "lets fork off a thread to print one character" loops right?

It is starting to sound like we are violently agreeing.

Replies are listed 'Best First'.
Re^7: unix loops in perl
by i5513 (Pilgrim) on Oct 27, 2011 at 22:32 UTC

    "If you do the work in a loop, you only use one process. If you create new processes and have each process do a portion of the work, then you create new processes. I don't see where that gets confusing."

    Ok, in original post was :
    for x in x y z ; do perl -bla 'bla bla' ; done
    I was talking about ;-)
    Some times parallelization save times, other not, it is clear. Yes, we agree, I think ..
    Regards,