in reply to Re^7: Multi-thread database script (forks.pm)
in thread Multi-thread database script

FYI, had you included "on Win32" in your prior note, that would have sufficiently addressed (and thus prevented) my question.

- tye        

  • Comment on Re^8: Multi-thread database script (forks.pm)

Replies are listed 'Best First'.
Re^9: Multi-thread database script (forks.pm)
by BrowserUk (Patriarch) on Jun 05, 2007 at 00:00 UTC

    It's all about context. When I read jplindstrom's post to which I replied, I was aware of the context of the OP, and replied in the light of that context. I see now that your post to which he was replying, had introduced a subcontext of "on Unix Perl". I do not remember whether I was aware of that context when I posted a few minutes after he did, but well over a month ago, but I doubt it.

    I take it that you have no time or interest in benchmarking forks -v- threads?


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

      I'm mildly curious to see some benchmarks. I'm not interested in running any particular benchmark myself. I have but small doubt that someone could produce an example that runs faster with threads.pm than with forks.pm. But I'd be surprised if one can't produce examples where forks.pm is faster than threads.pm (not on Win32, of course).

      Reading more of the forks documentation shows several other motivations for its creation beside performance (other than the reduced memory consumption which is mentioned as a goal) so I'm less convinced that the IPC for sharing has been as efficiently implemented as I expected. Though I'd still be very surprised if thread creation is not significantly faster with forks.pm than with threads.pm. And the module's documentation also supports my expectation that forks.pm is more stable than threads.pm (aka "less buggy").

      - tye