486c / rosu-memory

Lightweight, cross-platform memory reader for osu! but in rust
24 stars 7 forks source link

Reuse difficulty attributes from current_pp for fc_pp #21

Closed Chiffario closed 11 months ago

Chiffario commented 11 months ago

rosu-pp allows reusing difficulty attributes for same map-mod combinations, so this should be a tiny simple optimisation for that. Might come handy if someone added pp for x% later one because recalculating attributes doesn't scale well even with rosu-pp

MaxOhn commented 11 months ago

Re-using attributes is only applicable if map, mods, and passed object count is the same. Since the latter differs, attributes unfortunately can't be re-used here.

What would be possible though, is to store the if-fc attributes e.g. in Values and keep using those instead of re-calculating them each iteration.

Chiffario commented 11 months ago

Since the latter differs, attributes unfortunately can't be re-used here.

Oh, wonder how I didn't notice that the values were incorrect, not enough testing on my side I assume