Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Difference between this array assignment and push

by xhunter (Sexton)
on May 16, 2007 at 17:48 UTC ( [id://615846]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use Benchmark qw(:all) ;
    
    ...
        'Assigned' => sub { my @assigned = $foobar =~ /(foo)/g;},
        'Pushed' => sub { my @pushed; push @pushed, $1 while $foobar =~ /(
    +foo)/g; },
    });
    
  2. or download this
    Benchmark: timing 1000 iterations of Assigned, Pushed...
      Assigned:  1 wallclock secs ( 0.80 usr +  0.00 sys =  0.80 CPU) @ 12
    +50.00/s (n=1000)
        Pushed:  1 wallclock secs ( 0.93 usr +  0.00 sys =  0.93 CPU) @ 10
    +75.27/s (n=1000)
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-03-29 13:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found