use strict; use Benchmark qw(cmpthese); cmpthese(-1, { forward => sub { for (0 .. 10) {}; }, backward => sub { for (reverse 0 .. 10) {}; }, } );