Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

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

by Joost (Canon)
on May 27, 2005 at 17:21 UTC ( #461165=note: print w/replies, xml ) Need Help??


in reply to Re: Tail recursion using goto ⊂ (was: Re^3: Trinary Operator Semantics)
in thread Trinary Operator Semantics

Wierd, though the tail version gets relatively more efficient if you increase the recursion level:
cmpthese( -10, { "normal" => sub { normal(500000) }, "tail" => sub { tail(500000) }, "faster" => sub { faster(500000) }, } );
s/iter normal tail faster normal 2.26 -- -22% -40% tail 1.77 28% -- -23% faster 1.36 66% 30% --

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2019-04-20 08:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I am most likely to install a new module from CPAN if:
















    Results (108 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!