Rémi Lapeyre <[email protected]> added the comment:
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])
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue40225>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com