in reply to Tail recursion using goto ⊂ (was: Re^3: Trinary Operator Semantics)
in thread Trinary Operator Semantics
Using this test:sub faster { return 0 unless $_[0]; @_ = ($_[0] - 1); &faster; }
I got these results:cmpthese( -10, { "normal" => sub { normal(50000) }, "tail" => sub { tail(50000) }, "faster" => sub { faster(50000) }, } );
Rate normal tail faster normal 2.34/s -- -0% -41% tail 2.35/s 0% -- -41% faster 3.96/s 69% 68% --
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Tail recursion using goto ⊂ (was: Re^3: Trinary Operator Semantics)
by demerphq (Chancellor) on May 27, 2005 at 17:59 UTC | |
Re^2: Tail recursion using goto ⊂ (was: Re^3: Trinary Operator Semantics)
by Joost (Canon) on May 27, 2005 at 17:21 UTC |