Swift by Sundell cover image

80: “Lists and loops”, with special guest Nick Lockwood

Swift by Sundell

CHAPTER

Stack Overflows in Recursive Programming

With recursion, your loop counting and everything is being pushed onto the stack rather than being something that you're writing explicitly. You still have to consider it in terms of performance and also in memory usage. I ran into a problem with shape script actually. It uses a data structure called binary space partition, which is basically a kind of tree. And then pretty much any operation I tried to do on that tree was overflowing the stack.

00:00
Transcript
Play full episode

Remember Everything You Learn from Podcasts

Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.
App store bannerPlay store banner