Optimizing perft and friends.