3 ms·
gcc already optimises away loops like for (i = 0; i < n; i++) s += i; It wouldn't be too much of a stretch to detect and optimise away code that computes linea
by fdej 10y ago
gcc already optimises away loops like for (i = 0; i < n; i++) s += i;
It wouldn't be too much of a stretch to detect and optimise away code that computes linearly recurrent sequences.
- mbel 10y agogcc removes recursion in that case: https://godbolt.org/g/R6iBup https://godbolt.org/g/R6iBup