3 ms·
> In such situations, it would make sense to allow programmers to indicate the desired strategy to the compiler. If the function truly has no side effects then
by danachow 5y ago
> In such situations, it would make sense to allow programmers to indicate the desired strategy to the compiler.
If the function truly has no side effects then why would the programmer care which strategy was used other than cost? This is just an optimization that can be mechanistically applied. And if it does have side effects then the two constructs are not equivalent - one would just put the function call inside the conditional.
- adgjlsfhk1 5y agothe problem is that without pgo, the compiler can't know the odds that a condition will be true.