nave@lemmy.zip to Lemmy Shitpost@lemmy.worldEnglish · 2 年前I wishi.imgur.comexternal-linkmessage-square187fedilinkarrow-up1932
arrow-up1932external-linkI wishi.imgur.comnave@lemmy.zip to Lemmy Shitpost@lemmy.worldEnglish · 2 年前message-square187fedilink
minus-squareKaryoplasma@discuss.tchncs.delinkfedilinkarrow-up8·edit-22 年前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.
minus-square257m@sh.itjust.workslinkfedilinkarrow-up1·2 年前Since 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?