Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Lies, Damn Lies and Benchmarks

by liz (Monsignor)
on Mar 21, 2004 at 22:27 UTC ( #338521=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $self = shift;
    my %param = @_;
    
  2. or download this
    my ($self,%param) = @_;
    
  3. or download this
    use Benchmark qw(cmpthese);
    cmpthese( -2,{
    ...
    5.6.2       Rate    list shiftit
    list     94936/s      --    -68%
    shiftit 297717/s    214%      --
    
  4. or download this
    sub list { my ($self,%param) = @_ }
    sub shiftit { my $self = shift; my %param = @_ }
    ...
    5.6.2      Rate shiftit    list
    shiftit 89341/s      --    -10%
    list    98866/s     11%      --
    
  5. or download this
    cmpthese( -2,{
     list => sub { list( qw(foo) ) },
    ...
    5.6.2       Rate shiftit    list
    shiftit 179408/s      --    -12%
    list    203990/s     14%      --
    
  6. or download this
    cmpthese( -2,{
     list => sub { list() },
    ...
    5.6.2       Rate shiftit    list
    shiftit 212031/s      --    -14%
    list    246447/s     16%      --
    
  7. or download this
    To call subroutines:
    
    ...
               NAME LIST;     # Parentheses optional if predeclared/import
    +ed.
               &NAME(LIST);   # Circumvent prototypes.
               &NAME;         # Makes current @_ visible to called subrout
    +ine.
    
  8. or download this
    cmpthese( -2,{
     list => sub { &list },
    ...
    5.6.2       Rate    list shiftit
    list    135814/s      --    -61%
    shiftit 343986/s    153%      --
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://338521]
Approved by Corion
Front-paged by TStanley
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2014-09-22 21:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (205 votes), past polls