nave@lemmy.zip to Lemmy Shitpost@lemmy.worldEnglish · 11 个月前I wishi.imgur.comimagemessage-square188fedilinkarrow-up1927arrow-down117
arrow-up1910arrow-down1imageI wishi.imgur.comnave@lemmy.zip to Lemmy Shitpost@lemmy.worldEnglish · 11 个月前message-square188fedilink
minus-squareKaryoplasma@discuss.tchncs.delinkfedilinkarrow-up8arrow-down3·edit-211 个月前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·11 个月前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?