In my engine I use the zobrist hashing that is not really expensive because with the key I have also to incrementaly update the material+pst scores.
I use a struct that contains all like this:
Code: Select all
typedef struct
{
uint64_t Hash;
int16_t ScoreMg;
int16_t ScoreEg;
} THashEval;
THashEval HashEval[1037]; //the array with all the zobrist keys and the scores
Furthermore with copy-make I don't need to restore the previus key so in my engine zobrist hashing is very fast.
Having said that your solution seems good and could be successful used in engines.