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

Tail recursion using goto ⊂ (was: Re^3: Trinary Operator Semantics)

by Joost (Canon)
on May 27, 2005 at 16:50 UTC ( [id://461142]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!perl 
    use strict;
    ...
            "tail"   => sub {   tail(500000) },
        }
    );
    
  2. or download this
        normal: 25 wallclock secs (23.19 usr +  0.59 sys = 23.78 CPU) @  0
    +.42/s (n=10)
          tail: 18 wallclock secs (17.44 usr +  0.03 sys = 17.47 CPU) @  0
    +.57/s (n=10
    
  3. or download this
    #!perl 
    use strict;
    ...
            "tail"   => sub {   tail(1000000) },
        }
    );
    
  4. or download this
    Benchmark: timing 1 iterations of normal, tail...
        normal: 123 wallclock secs ( 6.58 usr +  1.13 sys =  7.71 CPU) @  
    +0.13/s (n=1)
                (warning: too few iterations for a reliable count)
          tail:  3 wallclock secs ( 3.50 usr +  0.01 sys =  3.51 CPU) @  0
    +.28/s (n=1)
                (warning: too few iterations for a reliable count)
    

Log In?
Username:
Password:

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

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

    No recent polls found