in reply to Native Map faster than MCE::Map.

I think we had the same question not long ago.

Point is that parallel jobs have a communication overhead, hence MCE::Map will only show it's potential if the jobs themselves are considerably heavier than the overhead.

edit

yep, see I thought MCE::Map is faster than usual map. What am I missing?

update

next time please use <code> not <pre> tags

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^2: Native Map faster than MCE::Map.
by Anonymous Monk on Jun 21, 2021 at 16:35 UTC

    Sure, I will use the code tag next time.

    As for the heavier workload, if I use a higher number, the program is "killed" by the OS (with or without MCE::Map). So not sure how to generate a "heavier" work load. Any pointers would be helpful.

      The job has to be heavier not the number of jobs.

      $_ * $_ is simply to fast to justify the overhead.

      Please read the thread I linked to AND the documentation of MCE::Map !

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery