@[email protected] to Lemmy [email protected]English • 1 year agoI wishi.imgur.commessage-square183fedilinkarrow-up1906
arrow-up1888imageI wishi.imgur.com@[email protected] to Lemmy [email protected]English • 1 year agomessage-square183fedilink
minus-squareKaryoplasmalinkfedilink5•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-square@[email protected]linkfedilink1•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?