I\'m making a chess engine and for my piece square tables i can use lists or dictionaries. As the implementation of the piece square tables made the engine two times slower,
Python in general is going to be slow for something like this.
Take a look at this other SO question, the first answer.
I'd say your best bet here is tuples first if your object can be immutable. If not, then stick with lists. Either way, there isn't going to be a huge difference between list
and dict
.
I see that halex has also just answered, and seems to agree.