Open rail5 opened 1 year ago
This is being developed now: https://github.com/rail5/polonius/wiki/Instruction-Optimization
But a little thought will be required to figure a decent (efficient) algorithm to apply the theorems
Polonius should also offer a --no-optimize
option, telling it to skip this process when wanted.
Ideally, the UIs would optimize instructions as they're building them, so that by the time the user presses ctrl+s and the instruction sequence is sent to polonius-editor, it's already down to a minimum, having been optimized without the user having noticed
REPLACE instructions are always preferred to INSERTs and REMOVEs, seeing as they're much faster
If a user types, for example:
Polonius should be able to detect that this could be optimized into a single REPLACE instruction:
This would be major, especially for very large files