3 ms·
I doubt that because it is only possible for the most trivial of compiler optimizations. For example, most compilers perform loop hoisting which speeds up unhoi
by bjourne 9y ago
I doubt that because it is only possible for the most trivial of compiler optimizations. For example, most compilers perform loop hoisting which speeds up unhoisted code. But if you are writing performance sensitive code to be used in a compiler, you would have hoisted your variables manually anyway!
Other examples include register allocation which you can either do slow using graph coloring or fast using linear scan. Graph coloring leads to better code, but much slower compilation times.
The compiler optimization that "pays for itself" is like a holy graal, it doesn't exist. :) No such thing as a free lunch. In the article they admit that, but argues that the somewhat slower compile times is worth it.