3 ms·
Both gcc and clang can often detect tail recursive functions and implement them with plain loops with no recursive call.
by onedognight 7y ago
Both gcc and clang can often detect tail recursive functions and implement them with plain loops with no recursive call.
- cryptoz 7y agoI assume this is advantageous because then they can unfurl the loops and parallelize instructions across loop 'boundaries'? I wonder if there are other advantages.
- onedognight 7y agoBounded stack usage is the main advantage.