4 ms·
Tail calls are only helpful if optimized into jumps instead of function calls.
by reeses 13y ago
Tail calls are only helpful if optimized into jumps instead of function calls.
- pnathan 13y agoAnd this only happens if your compiler will recognize it. Not all compilers are smart enough. And embedded compilers often don't have the love that mainstream compilers get. In the absence of specific & concrete evidence that your compiler does this optimization and that you have and will tested this (including checking the emitted assembly code), it is correct to assume that TCO does not happen and to perfom stack depth analyses based upon that.
- pessimizer 13y agoIf you also built the computer, wouldn't you already have that specific and concrete evidence?
- pnathan 13y agoBeg pardon? I don't know what you mean. Most embedded companies purchase a chip... sometimes the compilers come from the same company that made the chip, sometimes not. Regardless, it's the engineer's responsibity to not assume about such a critical part of the design.