skotz / volcanoes

Prototype for a new board game
4 stars 1 forks source link

performance improvements #15

Closed skotz closed 5 years ago

skotz commented 5 years ago

need some serious speed improvements

11,318 positions / 8011 milliseconds = 1,413 nps // baseline debug
skotz commented 5 years ago

improved mcts speed 4.53x over baseline

11,318 positions / 8011 milliseconds = 1,413 nps // baseline debug
11,637 positions / 8010 milliseconds = 1,453 nps // convert move to int
11,783 positions / 8010 milliseconds = 1,471 nps // getmoves exclude duplicate antipodes
18,547 positions / 8009 milliseconds = 2,316 nps // win search pre-filter
21,077 positions / 8013 milliseconds = 2,630 nps // win search pre-filter more
26,031 positions / 8004 milliseconds = 3,252 nps // remove lazy pattern for game settings
27,076 positions / 8002 milliseconds = 3,384 nps // replace properties with public fields
31,313 positions / 8007 milliseconds = 3,911 nps // remove more getters on board
35,502 positions / 8006 milliseconds = 4,434 nps // replaced even more properties
43,758 positions / 8006 milliseconds = 5,466 nps // more properties on the tile
45,588 positions / 8005 milliseconds = 5,695 nps // connecting tile constant in path search
49,154 positions / 8007 milliseconds = 6,139 nps // switch path finder list to queue
49,595 positions / 8006 milliseconds = 6,195 nps // reduce constants lookup
50,117 positions / 8008 milliseconds = 6,258 nps // reduced eruption checking cycles
51,237 positions / 8005 milliseconds = 6,401 nps // shortcut eruption logic

release build runs at 11,222 nps