2 ms·
There are many optimizations that are guaranteed to make code run faster, but even then, that does not mean you should use them. There can be competition betwe
by Someone 1y ago
There are many optimizations that are guaranteed to make code run faster, but even then, that does not mean you should use them.
There can be competition between optimizations. At a given moment, the preconditions for both optimization O1 and optimization O2 may hold, but if you then apply O1, the precondition for O2 may no longer hold and vice versa.
In such cases, the best solution is to pick the better of O1 and O2.
- Findecanor 1y agoIf I understood it right, Equality Saturation of E-graphs is intended to help solve that problem. Cranelift has an optimiser based on it, for classic optimisations within an IR.