E
Edo
Hello
I am not able to run these 2 codes to find which is faster because I
just don't know how to. any help is appriciated.
thanks
#!/perl -w
use strict;
use warnings;
use List:ermutor;
use Algorithm:ermute;
use Benchmark qwall);
my $perm = new List:ermutor qw/ a b c d e /;
while (my @set = $perm->next) {
print "@set.\n";
}
my $p = new Algorithm:ermute(['a'..'e']);
while (my @res = $p->next) {
print join(", ", @res), "\n";
}
cmpthese($count, {
'Name1' => '...code1...',
'Name2' => '...code2...',
});
I am not able to run these 2 codes to find which is faster because I
just don't know how to. any help is appriciated.
thanks
#!/perl -w
use strict;
use warnings;
use List:ermutor;
use Algorithm:ermute;
use Benchmark qwall);
my $perm = new List:ermutor qw/ a b c d e /;
while (my @set = $perm->next) {
print "@set.\n";
}
my $p = new Algorithm:ermute(['a'..'e']);
while (my @res = $p->next) {
print join(", ", @res), "\n";
}
cmpthese($count, {
'Name1' => '...code1...',
'Name2' => '...code2...',
});