486c / rosu-memory

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

Reduce the amount of diff attribute calculations #33

Closed S1n1st3rn3ss closed 8 months ago

S1n1st3rn3ss commented 8 months ago

Requires #30 as I branched off of that. Also requires a benchmark cuz even though it should be a decent performance increase, I'm not sure

Runs AnyPP::new() once upon entering the beatmap instead of running it every update. Attributes are saved in Values and reused for fc_pp. Reusing in a non memory-efficient way because I want to get speed to a better point first. Other than that, should work juuuust fine

MaxOhn commented 8 months ago

Storing and cloning should definitely be much more performant than re-calculating difficulty attributes every iterations so I'm all for it 👍

486c commented 8 months ago

Kinda sad that we should use that 'static hack, but performance gains is pretty decent so probably good idea to leave it for now, and maybe rethink this whole situation somewhere in the future.

Waiting for proper rebase/merge with upstream changes :)

S1n1st3rn3ss commented 8 months ago

Closing because I managed to break something, will remake the PR