Optimising Perl 5
sub fib_optimised { $_[0] > 1 ? fib_optimised($_[0] - 1) + fib_optimised($_[0] - 2) : $_[0]; }