Is it a "good thing" in all ways? Does it make Rust slower than C++ in some cases? And if Rust wants to catch up to C++ in regards to performance, do you believe that Rust people like yourself will have to convince C++ language people to remove time travel optimizations? Not very nice or honorable of you. Why not focus on making Rust faster instead?
Edit:
Why does kibwen sound like a cheap whore putting on airs? As if, kibwen couldn't be honest or competent even if its (pronoun: thing) life depended on it.
And in the cases where you are in a hot loop you just have to put in a little extra effort to optimise it and gain the performance back, either by writing the code in a way that allows the compiler to prove correctness (e.g. using an iterator or assert), or by using the unsage keyword to "pinky-promise" to the compiler that your usage is correct.
IME that extra effort in performance-critical places almost always ends up being a lot less than the effort needed to avoid correctness/safety issues in mundane boilerplate/glue/plumbing code in C++.
Especially as Rust's package management system means that often you don't even have to do that optimisation work yourself: you can just pull in a crate that's done it for you (and Rust's safety guarantees make that a much less scary thing to do than it is in C++)
Did you generate your comment using LLM?
> negligable
Negligible.
(It was hand written. Typos and all.)
That does create a problem for early panics, panicking when panic becomes inevitable but has not happened yet. This deserves more thought.
What the compiler is allowed to do is to shorten the loop by one and unconditionally panic after the loop, but this falls under the purview of the LLVM optimizer.