Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Perl threads loss of performance with system call

by perlfan (Vicar)
on Jul 10, 2021 at 05:33 UTC ( [id://11134887]=note: print w/replies, xml ) Need Help??


in reply to Perl threads loss of performance with system call

> why?

Because Perl doesn't have real lightweight, shared memory threads like you post is making me think might think (through perhaps no fault of your own).

> no, really, why?

You haven't mentioned anything about the computing environment - virtual, bare metal, one CPU, many vCPUs, etc? Can you replicate this via bash backgrounding child processes?

Replies are listed 'Best First'.
Re^2: Perl threads loss of performance with system call
by daniel85 (Novice) on Jul 10, 2021 at 08:26 UTC
    Hi perlfan, the computer is a Fedora linux machine with 56 cores.
      Trust me, if you want to do real threading, perl is the wrong tool. If you're cool with fork, it is. Check out MCE as suggested, or my personal hammer, Parallel::ForkManager. PDL::ParallelCPU looks interesting, but I have not tried it out.

      That said, if you want to feel "perlish" yet have real SMP threading, checkout out Qore.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11134887]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2024-04-16 11:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found