3 ms·
The C standard doesn't mandate tail-call optimization, but at least GCC and Clang are pretty good at doing it (-foptimize-sibling-calls, which is turned on with
by ufo 5y ago
The C standard doesn't mandate tail-call optimization, but at least GCC and Clang are pretty good at doing it (-foptimize-sibling-calls, which is turned on with -O2)
- masklinn 5y agoThat it is only an optimisation ensures it will eventually fail to trigger at the least convenient possible moment. Unless your C implementation has TCE, don’t assume recursion is optimised.