The benchmark I setup runs all replays in benches/data/ for each of three test cases (7 replays * 3 = 21 total benchmarks):
Parse into a Game struct
Parse by passing in a dummy Handlers struct
Parse into a Game struct with skip_frames: true
Note: currently a bug prevents peppi from parsing the entire casual_doubles.slp replay (see #42). However, the benchmark still runs fine.
Currently the benchmarks times are inconsistent (roughly +/- 5% or so) on my laptop. I tried playing with the settings, but couldn't fully shake the inconsistency. Maybe a different computer would do better. The replays are setup where reading from disk and dropping the Game does not affect the results, but other factors like system load can affect things. ~This is why I'm considering using iai also.~
Edit: I added Iai benchmarks and they look great. Run-to-run they change <1% except sometimes for the skip_frames tests (but those are so much faster anyways it's not a big concern). We should keep both though because they each have their pros and cons.
achieves #38
The benchmark I setup runs all replays in
benches/data/
for each of three test cases (7 replays * 3 = 21 total benchmarks):Game
structHandlers
structGame
struct withskip_frames: true
Note: currently a bug prevents peppi from parsing the entire
casual_doubles.slp
replay (see #42). However, the benchmark still runs fine.Currently the benchmarks times are inconsistent (roughly +/- 5% or so) on my laptop. I tried playing with the settings, but couldn't fully shake the inconsistency. Maybe a different computer would do better. The replays are setup where reading from disk and dropping the
Game
does not affect the results, but other factors like system load can affect things. ~This is why I'm considering using iai also.~Edit: I added Iai benchmarks and they look great. Run-to-run they change <1% except sometimes for the
skip_frames
tests (but those are so much faster anyways it's not a big concern). We should keep both though because they each have their pros and cons.