3 ms·
This assumes that compiler optimizations proceed exponentially, but it's actually asymptotic. There is a hypothetical ideal form, where no further optimization
by jimrandomh 18y ago
This assumes that compiler optimizations proceed exponentially, but it's actually asymptotic. There is a hypothetical ideal form, where no further optimization is possible. Each optimization brings the program closer to that form, and as you get close, you start running into diminishing returns.
Besides, most of the interesting problems are questions of how many programs you can optimize, not much you can optimize one given program. Automatic parallelization and vectorization is worth an order of magnitude speed improvement, but compilers can only apply it in a small percentage of the cases where it would be applicable.