Hacker News new | ask | show | jobs
by rom-antics 1221 days ago
Compiler optimizations are best-effort. -O3 gets you 90% of the optimization for 10% of the work of writing hand-rolled assembly. Individual optimizations are not guaranteed, and sometimes even regress in newer compiler versions, but everyone uses them because overall programs run much faster with optimizations than without. I don't see how TCO is any different. Would you say all optimizations are worthless because they're not guaranteed?
1 comments

> Would you say all optimizations are worthless because they're not guaranteed?

Context is relevant, the context here is language semantics, not things going faster.

TCO is fine to make things go faster, like inlining, unrolling, LICM, ....

TCO is hot garbage when you rely on it for program correctness.

Weird how none of that context was present in your first two iterations of the claim.