Is 17% faster than my original version.#!/usr/bin/perl use integer; my $i = 0; while ($i += 20) { last unless ( $i % 19 or $i % 18 or $i % 17 or $i % 16 or $i % 15 or $i % 14 or $i % 13 or $i % 12 or $i % 11 ); } print "Number: $i\n";
In reply to Re^4: Why is this code so much slower than the same algorithm in C?
by snowhare
in thread Why is this code so much slower than the same algorithm in C?
by wanna_code_perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |