Micro optimize generate_piece_checks()