Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Curious find while comparing grep, map, and smart match...

by dbuckhal (Chaplain)
on Mar 27, 2013 at 00:25 UTC ( [id://1025608]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    Benchmark: timing 2500 iterations of grepGen, mapGen, smartGen...
       grepGen: 34 wallclock secs (34.35 usr +  0.00 sys = 34.35 CPU) @ 72
    +.78/s (n=2500)
        mapGen: 14 wallclock secs (14.09 usr +  0.00 sys = 14.09 CPU) @ 17
    +7.47/s (n=2500)
    ...
    1 12 15 18 19 20 21 22 23 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
    + 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
    + 64 65 66 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
    + 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 104 105 106 107 108 
    +109 110 111 112 113 114 116 117 118 119
    smart:
    0 1 2 3 5 7 8 9 12 13 15 16 18 19 21 22 23 25 26 27 28 29 30 31 32 33 
    +34 35 36 37 38 39 42 43 44 45 46 47 48 51 52 53 54 55 56 57 58 59 60 
    +61 62 63 64 65 66 68 69 70 71 72 73 74 75 76 77 78 79 81 83 84 85 86 
    +87 89 90 91 92 93 94 95 96 97 98 100 101 102 104 105 106 107 108 109 
    +110 111 112 113 116 117 118 119
    
  2. or download this
    #!/usr/bin/perl
    
    ...
        }
        return @sArray;
    }
    

Log In?
Username:
Password:

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

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

    No recent polls found