Right now, if you select viper/sinister/grieving, the optimizer always starts on full viper and ends on full grieving.
If settings.affixes[i]
were instead settings.affixes[slot][i]
, one could rearrange the affix order on a per-slot basis. So settings.affixes[helm]
could be [viper, sinister, grieving]
, but settings.affixes[chest]
could be [grieving sinister, viper]
. Every combination would still get iterated through, but the order would be different. This could speed up getting to the interesting combinations of a 3 (or 4+) stat optimization, e.g. so you can cancel earlier when you realize one of the affixes/infusions you have selected is never used.
This may be a performance gain, if getting a higher worstScore earlier reduces shuffling. Especially useful if multithreading the optimizer.
Care must be taken to not break ring/acc/shoulder/glove/boot deduplication.