in reply to Re: Why is this code so much slower than the same algorithm in C?
in thread Why is this code so much slower than the same algorithm in C?
#!/usr/bin/perl use integer; my $i = 0; while ($i += 20) { last unless ($i % 3 or $i % 6 or $i % 7 or $i % 8 or $i % 9 or $i % 11 or $i % 12 or $i % 13 or $i % 14 or $i % 15 or $i % 16 or $i % 17 or $i % 18 or $i % 19 or $i % 20); } print "Number: $i\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Why is this code so much slower than the same algorithm in C?
by Limbic~Region (Chancellor) on Dec 10, 2008 at 20:08 UTC | |
by tye (Sage) on Dec 10, 2008 at 20:46 UTC | |
by snowhare (Friar) on Dec 11, 2008 at 19:11 UTC | |
by tye (Sage) on Dec 12, 2008 at 03:31 UTC | |
by tilly (Archbishop) on Dec 15, 2008 at 13:19 UTC | |
by tye (Sage) on Dec 16, 2008 at 02:55 UTC | |
by tilly (Archbishop) on Dec 16, 2008 at 17:42 UTC | |
by snowhare (Friar) on Dec 11, 2008 at 19:06 UTC |