nave@lemmy.zip to Lemmy Shitpost@lemmy.worldEnglish · 2 years agoI wishi.imgur.comexternal-linkmessage-square188fedilinkarrow-up1928arrow-down117
arrow-up1911arrow-down1external-linkI wishi.imgur.comnave@lemmy.zip to Lemmy Shitpost@lemmy.worldEnglish · 2 years agomessage-square188fedilink
minus-squareKaryoplasma@discuss.tchncs.decakelinkfedilinkarrow-up8arrow-down3·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-square257m@sh.itjust.workslinkfedilinkarrow-up1·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?