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

Benchmark - How to get ($1, $2, ...)?

by ferreira (Chaplain)
on Feb 17, 2007 at 18:55 UTC ( #600620=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # @groups = groups1($s)
    sub groups1 {
        return map { substr $_[0], $-[$_], $+[$_] - $-[$_] } 1..$#- 
    }
    
  2. or download this
    # educated_foo
    sub groups2 {
        no strict 'refs'; return map { $$_ } 1..$#- 
    }
    
  3. or download this
    # demerphq
    sub groups3 {
        return eval '($'.join(',$',1..$#-).')'
    }
    
  4. or download this
                 s/iter     demerphq    @- and @- educated_foo
    demerphq       6.65           --         -44%         -50%
    @- and @-      3.72          79%           --         -10%
    educated_foo   3.34          99%          11%           --
    
  5. or download this
    #!/usr/bin/perl
    
    ...
    });
    
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2019-07-17 02:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?