@nave@lemmy.zip to Lemmy Shitpost@lemmy.worldEnglish • 8 months agoI wishi.imgur.comimagemessage-square189fedilinkarrow-up1928arrow-down117
arrow-up1911arrow-down1imageI wishi.imgur.com@nave@lemmy.zip to Lemmy Shitpost@lemmy.worldEnglish • 8 months agomessage-square189fedilink
minus-squareKaryoplasmalinkfedilink5•edit-28 months agoDon’t use recursion. Each call will need to allocate a new stack frame which leads to a slower runtime than an iterative approach in pretty much any language.
minus-square@257m@sh.itjust.workslinkfedilink1•8 months agoSince when did Python have tail call optimization?
Don’t use recursion. Each call will need to allocate a new stack frame which leads to a slower runtime than an iterative approach in pretty much any language.
TCO baby
Since when did Python have tail call optimization?