#!perl use strict; use Benchmark; sub normal { return 0 unless $_[0]; @_ = ($_[0] - 1); return normal(@_); } sub tail { return 0 unless $_[0]; @_ = ($_[0] - 1); goto &tail; } timethese( 1, { "normal" => sub { normal(1000000) }, "tail" => sub { tail(1000000) }, } );