nave@lemmy.zip to Lemmy Shitpost@lemmy.worldEnglish · 1 year agoI wishi.imgur.comexternal-linkmessage-square179fedilinkarrow-up1916arrow-down118
arrow-up1898arrow-down1external-linkI wishi.imgur.comnave@lemmy.zip to Lemmy Shitpost@lemmy.worldEnglish · 1 year agomessage-square179fedilink
minus-squareKaryoplasma@discuss.tchncs.delinkfedilinkarrow-up7arrow-down3·edit-21 year 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·1 year 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?