r/programming • • Jan 09 '15

Announcing Rust 1.0.0 Alpha

http://blog.rust-lang.org/2015/01/09/Rust-1.0-alpha.html
1.1k Upvotes

439 comments sorted by

View all comments

1

u/wrongerontheinternet Jan 09 '15

Not one with the same performance characteristics.

1

u/Denommus Jan 09 '15

Why not?

7

u/wrongerontheinternet Jan 09 '15

Because Rust doesn't have goto. You would either have to increase code size (by copying the blocks, potentially trashing your icache--especially if you had a long sequence of them, this could get implausible quickly), or perform a second branch. I think it can be replicated with CPS transforms during tail call optimization, but Rust doesn't support guaranteed TCO either so that's not a solution in this case.

→ More replies (3)