Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: map vs for\foreach.

by sn1987a (Deacon)
on Mar 11, 2015 at 15:12 UTC ( [id://1119654]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
            'map (bare)'   => sub { map { $_ += 1 } @a; },
        }
    );
    
  2. or download this
                 s/iter map (assign)   map (bare)      foreach
    map (assign)   2.06           --         -40%         -76%
    map (bare)     1.23          67%           --         -59%
    foreach       0.501         311%         146%           --
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-19 03:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found