http://www.perlmonks.org?node_id=723853


in reply to Re^4: C-style for loop
in thread C-style for loop

#!/usr/bin/perl -- use strict; use warnings; use Benchmark qw(cmpthese); my $BIG = 100_000; cmpthese(1000, { 'C-style' => \&c, 'P-style' => \&p}); sub c { for (my $i = $BIG; $i > 0; $i--) { 1; } } sub p { for my $i ( reverse 1..$BIG ) { 1; } } __END__ Rate P-style C-style P-style 26.7/s -- -44% C-style 48.0/s 80% --

Is Perl-style still better?