We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0398a9a commit 3b3dd5eCopy full SHA for 3b3dd5e
1 file changed
week-08/code/timing.py
@@ -4,7 +4,7 @@
4
timing example
5
"""
6
7
-@profile
+# @profile
8
def primes_stupid(N):
9
10
a really simple way to compute the first N prime numbers
@@ -22,14 +22,14 @@ def primes_stupid(N):
22
return primes
23
24
if __name__ == "__main__":
25
- # import timeit
+ import timeit
26
27
28
- # print "running the timer on primes_stupid:"
29
- # run_time = timeit.timeit("primes_stupid(100)",
30
- # setup="from __main__ import primes_stupid",
31
- # number=500) # default: 1000000
32
- # print "it took: %f seconds"%run_time
+ print "running the timer on primes_stupid:"
+ run_time = timeit.timeit("primes_stupid(100)",
+ setup="from __main__ import primes_stupid",
+ number=500) # default: 1000000
+ print "it took: %f seconds"%run_time
33
primes_stupid(100)
34
35
0 commit comments