3 ms·
If you need an infinite loop (or very large iteration count), and rely on TCE but it is not available, the semantics of your program will change. In the "best"
by beagle3 6y ago
If you need an infinite loop (or very large iteration count), and rely on TCE but it is not available, the semantics of your program will change.
In the "best" case, you'll get a stack overflow exception. In worse cases, your exception/condition system will kick in at a time which is essentially non-deterministic (it's usually deterministic but depends on a lost of things you may have no visibility into).
But if TCE is available, you might even have no allocations after some startup. That's different semantics which are part of the language (e.g. in the case of Scheme) and thus not an "optimization".