Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Use of do() to run lots of perl scripts

by stevieb (Canon)
on Mar 02, 2021 at 18:34 UTC ( [id://11129025]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    Benchmark: timing 100000 iterations of do, sys...
            do:  4 wallclock secs ( 2.91 usr +  0.82 sys =  3.73 CPU) @ 26
    +809.65/s (n=100000)
           sys: 441 wallclock secs ( 1.65 usr 19.06 sys + 304.06 cusr 117.
    +50 csys = 442.27 CPU) @ 226.11/s (n=100000)
    
  2. or download this
           Rate    sys     do
    sys   223/s     --   -99%
    do  26110/s 11617%     --
    
  3. or download this
    use warnings;
    use strict;
    ...
            sys   => sub { system 'perl script.pl' },
        }
    );
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (1)
As of 2024-04-25 02:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found