On Fri, 16 Jul 2004 15:55:32 +1200, Greg Ewing <greg at cosc.canterbury.ac.nz> wrote: > We could get the benefits of that just by eliminating recursive calls > to ceval() when a Python function calls a Python function. I think > that would be a worthwhile thing to do on its own, because it would > mean recursion in pure Python would be limited only by available > memory and not an arbitrary recursion limit, which has always seemed > like a kludge to me. The recursion limit isn't imposed so much by the C stack as it is by an an actual, arbitrary limit enforced by the interpreter (presumably to protect the C stack), one which can be effectively nullified in Python by feeding a proper value to sys.setrecursionlimit(). The point of my patch is not to eliminate the recursive nature of the interpreter (that's what Stackless is for), but to eliminate the memory usage required by recursive functions -- after 100,000 recursions, normal Python eats up nearly 80MB, whereas with this patch, it just eats up its standard 4 or 5MB or what-have-you. An unfortunate side effect of this is, of course, the elimination of correct stack traces.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4