in reply to Re: Forking Multiple Regex's on a Single String
in thread Forking Multiple Regex's on a Single String

Parallel::ForkManager is available through ppm so someone considers it sufficiently useful under Windows to have gone to the effort of adding it to an ActiveState repository.


DWIM is Perl's answer to Gödel
  • Comment on Re^2: Forking Multiple Regex's on a Single String

Replies are listed 'Best First'.
Re^3: Forking Multiple Regex's on a Single String
by tilly (Archbishop) on Aug 19, 2006 at 23:09 UTC
    My understanding is that it kind of works, but fork is very heavyweight on Windows. And is implemented using threading, which may reduce how much the scheduler will want to schedule it on multiple CPUs. Therefore I wouldn't expect the same performance benefits from fork under Windows that I would on Unix, Linux, or OS X.

    Then again, as always, this is dated information from someone who doesn't use Windows. This may have changed, improved, etc. But if it has, I am not aware of it.

      I don't know how the module may be implemented on Windows. However I do know that Windows is happy to allocate threads for the same process to different CPUs. There are other issues with fork under Windows that may incure a startup cost per fork, but shouldn't make much difference during the subsequent execution of the forked process.


      DWIM is Perl's answer to Gödel
        It is good to know that Windows will allocate threads for the same process to different CPUs.

        As for the other issues, since the strategy that I was suggesting involved lots of forks, that startup cost is relevant.