@[email protected] to Lemmy [email protected]English • 8 months agoI wishi.imgur.commessage-square185fedilinkarrow-up1906
arrow-up1888imageI wishi.imgur.com@[email protected] to Lemmy [email protected]English • 8 months agomessage-square185fedilink
minus-squareKaryoplasmalinkfedilink5•edit-28 months 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@[email protected]linkfedilink1•8 months 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?