slothy-optimizer / slothy

Assembly super-optimization via constraint solving
https://slothy-optimizer.github.io/slothy/
Other
167 stars 10 forks source link

Allow automatic choice of split factor #82

Open hanno-becker opened 3 months ago

hanno-becker commented 3 months ago

Context: When optimizing large code using the split heuristic, a rough rule of thumb is to pick the split factor so that each window has a size somewhere between 50-200 instructions. It is curently up to the user to make this calculation and configure SLOTHY appropriately.

Task: Allow the configuration of a 'split heuristic threshold', which is a codesize above which split heuristic should be applied automatically, picking the split factor so that the window size is as specified by the threshold. For example, is split_heuristic_threshold=150 and one is optimizing code of length 400, it should automatically pick split_factor=2.66.

hanno-becker commented 3 months ago

cc @aqjune