Skip to main content
fixed spelling
Source Link
Walter
  • 16.1k
  • 8
  • 60
  • 95

Python has no tail-call optimization, mostly for philosophical reasons. This means thanthat tail-recursing on large structures can cost O(n) memory (because of the unnecessary stack that is kept) and will require you to rewrite the recursion as a loop to get O(1) memory.

Python has no tail-call optimization, mostly for philosophical reasons. This means than tail-recursing on large structures can cost O(n) memory (because of the unnecessary stack that is kept) and will require you to rewrite the recursion as a loop to get O(1) memory.

Python has no tail-call optimization, mostly for philosophical reasons. This means that tail-recursing on large structures can cost O(n) memory (because of the unnecessary stack that is kept) and will require you to rewrite the recursion as a loop to get O(1) memory.

Source Link
a3nm
  • 101
  • 2

Python has no tail-call optimization, mostly for philosophical reasons. This means than tail-recursing on large structures can cost O(n) memory (because of the unnecessary stack that is kept) and will require you to rewrite the recursion as a loop to get O(1) memory.

Post Made Community Wiki by a3nm