@nave@lemmy.zip to Lemmy Shitpost@lemmy.worldEnglish • 2 years agoI wishi.imgur.comimagemessage-square169arrow-up1890
arrow-up1890imageI wishi.imgur.com@nave@lemmy.zip to Lemmy Shitpost@lemmy.worldEnglish • 2 years agomessage-square169
minus-squareKaryoplasmalinkfedilink8•edit-22 years 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•2 years 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?