Message366050
I'm unable to run the example as it segfaults on my computer because of the linear recursion but do you notice the same behavior with:
from time import time
from sys import setrecursionlimit
setrecursionlimit(10000000)
def recurse(i):
if i < 0:
return
recurse(i-1)
if __name__ == '__main__':
lo = 8
hi = 16
t = {}
for sh in range(lo, hi):
b4 = time()
x = 1 << sh
ret = recurse(x)
after = time()
t[sh] = after - b4
for sh in range(lo+1, hi):
print(t[sh] / t[sh-1]) |
|
Date |
User |
Action |
Args |
2020-04-09 13:21:31 | remi.lapeyre | set | recipients:
+ remi.lapeyre, rhettinger, vstinner, brendon-zhang@hotmail.com |
2020-04-09 13:21:31 | remi.lapeyre | set | messageid: <1586438491.95.0.894221600941.issue40225@roundup.psfhosted.org> |
2020-04-09 13:21:31 | remi.lapeyre | link | issue40225 messages |
2020-04-09 13:21:31 | remi.lapeyre | create | |
|