#!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( 10, { "normal" => sub { normal(500000) }, "tail" => sub { tail(500000) }, } );