Have advancements in CPU design like dynamic instruction scheduling narrowed the performance gap between code generated by splat compilers and by optimizing compilers, i.e. can compilers get away with being more stupid these days?
Have advancements in CPU design like dynamic instruction scheduling narrowed the performance gap between
Share
On the contrary, optimizing compilers achieve more on contemporary CPUs. Automatic vectorization makes code up to several times faster. Modern instruction sets also give some optimization opportunities (for example, using CMOV instead of conditional branch on x86).
There are some areas, where performance gap is narrowed. CPU performs function calls faster, so function inlining may be not as beneficial as earlier. Loop unrolling may sometimes make code a little bit slower. But in most cases compiler optimizations and CPU optimizations are orthogonal to each other. CPUs cannot do loop fusion or common subexpression elimination. Compilers cannot provide good alternative to dynamic instruction scheduling, branch prediction or data prefetch.