minus-squareGiooschi@lemmy.worldtoRust Programming@lemmy.ml•Which is faster?linkfedilinkEnglisharrow-up2·edit-28 hours ago let statements only reserves space on the stack It is not guaranteed to do that. It could also use a register or be optimized out completly (like in the example you posted in the other comment). The stack pointer is also not changed for each local variable, but instead for each function call, so it wouldn’t make a difference anyway. linkfedilink
It is not guaranteed to do that. It could also use a register or be optimized out completly (like in the example you posted in the other comment).
The stack pointer is also not changed for each local variable, but instead for each function call, so it wouldn’t make a difference anyway.