Skip to content

Instantly share code, notes, and snippets.

@jnthn
Created October 15, 2011 14:50
Show Gist options
  • Save jnthn/1289672 to your computer and use it in GitHub Desktop.
Save jnthn/1289672 to your computer and use it in GitHub Desktop.
use v5.10;
use Time::HiRes qw(time);
my $t = time();
system('perl -E "my $i = 0; while ($i < 10000000) { $i = $i + 1 }; say $i"');
say time() - $t;
$t = time();
system('perl6 --optimize=3 -e "my int $i = 0; while $i < 10000000 { $i = $i + 1 }; say $i"');
say time() - $t;
10000000
0.745043039321899
10000000
4.34311890602112
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment