3 ms·
>The CPU knows what the software is actually doing and has done in the past. The compiler does not. profile guided optimizations?
by gruez 8y ago
>The CPU knows what the software is actually doing and has done in the past. The compiler does not.
profile guided optimizations?
- gmueckl 8y agoProfiles capture only program brhabiour under test Data and sssumed that that pattern is prevalent. If the actual runtime behaviour is bimodal or worse, then only one mode will be optimized at most. A CPU can keep statiatics at runtime (the branch predictor does) and thus adapt ever so slightly to the actual current program behaviour.
- flukus 8y agoRuntime optimizations have there own problems. Sometimes the rare case will also be the most sensitive, sometimes the statistics will take too long to turn around, etc. At least profile guided optimization gives you a degree of control.