2 Copyright (C) 2001-2003, Parrot Foundation.
7 examples/benchmarks/primes.py - Calculate prime numbers < 5000
11 % time python examples/benchmarks/primes.py
15 Calculates all the prime numbers up to 50000 and prints out the number
16 of primes and the last one found.
52 print "N primes calculated to ",max, i6
55 if __name__
== "__main__":
62 F<examples/benchmarks/primes.c>,
63 F<examples/benchmarks/primes.pasm>,
64 F<examples/benchmarks/primes.pl>,
65 F<examples/benchmarks/primes2_p.pasm>,
66 F<examples/benchmarks/primes2.c>,
67 F<examples/benchmarks/primes2.pir>,
68 F<examples/benchmarks/primes2.py>.