News for hackers. Stuff that matters.
Re:Zero-cost futures in Rust by saynsedit on Thursday August 11, 2016 @07:34PM (#12272469)
He's talking about the difference between swapping the stack pointer and executing a single "jump" instruction vs initiating a full function call (pushing argument(s), function prologue/epilogue)
Re:Zero-cost futures in Rust by pcwalton on Thursday August 11, 2016 @08:22PM (#12272711)
Calling a function isn't "allocation". And you don't just swap the stack pointer: you have to reload the register state. It's the same cost as a function call.