flyxiv / ffxiv_simhelper_issues

0 stars 0 forks source link

final optimization before beta #19

Closed flyxiv closed 5 days ago

flyxiv commented 1 week ago

We need to increase number of simulation to reduce variation of results.

We're already at 1000, but at least x5 should be done.

To do this, we're squeezing out every last bit of optimization we can do.

flyxiv commented 1 week ago

we only search for ogcd on the highest possible first ogcd. If there is no skill that can be casted with that first ogcd we just early return as a one-ogcd turn.

flyxiv commented 1 week ago

too much memory resource is being used in actually simulating possible events, which causes cloning and dropping. We make simulating done by pointers to minimize memory usage

Screenshot 2024-09-18 at 1 59 23 PM
flyxiv commented 1 week ago

Optimized simulation cloning. Now speed is 14s <- 20s (30% faster)

flyxiv commented 1 week ago

The next skill optimizer part reduced heavily

Screenshot 2024-09-18 at 6 03 08 PM
flyxiv commented 1 week ago

Further Optimizations

Screenshot 2024-09-18 at 6 16 58 PM
flyxiv commented 1 week ago

The number of buffs/turns/damage events are almost identical (5min fight, 8man party)

Screenshot 2024-09-18 at 6 39 06 PM
flyxiv commented 1 week ago

lazy cooldown evaluation

Before, we updated skill CD/status remaining time every time the clock moved. But we figured out that we only need to update time whenever it is a player's turn to handle an event.

So we just accumulate the elapsed time until that player's turn to handle an event comes, and then we update the time components of the character.

15s -> 10s, another 30% gain

Screenshot 2024-09-18 at 11 57 50 PM