hsr-optimizer icon indicating copy to clipboard operation
hsr-optimizer copied to clipboard

[Performance] Update relic / ornament set filtering algorithm

Open fribbels opened this issue 1 year ago • 0 comments

Motivation

Currently we're generating the permutations of all possible relic and ornament sets in order to use O(1) lookup in the optimizer loop. For ornament sets this isnt an issue since there's 18 ^ 2 permutations, but relic sets are at 20 ^ 4 = 160000 and this will soon become unscalable.

Goal

There's probably two phases to this, the initial phase is to immediately reduce the size of this buffer with some bit packing as a short term improvement.

The long term fix is to pick a different set matching algorithm that doesn't require all this to be generated as an array. This will only become a problem at around our 48th relic set and then we'd be back at where we are today in terms of memory usage

fribbels avatar Sep 04 '24 04:09 fribbels