Open kalebburnham opened 1 year ago
These are the stats just for generating the IntEnums for the same tree traversal:
ncalls tottime percall cumtime percall filename:lineno(function) 50652319 14.144 0.000 67.814 0.000 enum.py:358(call) 50652319 53.669 0.000 53.669 0.000 enum.py:670(new) 101455698 7.965 0.000 7.965 0.000 enum.py:792(value)
The current bitboard() function is incredibly slow. The profile stats below are for a tree traversal of just 6 half-moves.
Come up with a better way to store square information. This might be done through a dictionary or something else, but there's no reason an IntEnum needs to be created. That's just too many objects and bit shifts.
From the profiler: ncalls tottime percall cumtime percall filename:lineno(function) 82646873 70.025 0.000 95.964 0.000 board.py:98(bitboard)