def endgame_score_connectfour_faster(board, is_current_player_maximizer) :
    """Given an endgame board, returns an endgame score with abs(score) >= 1000,
    returning larger absolute scores for winning sooner."""
    chains_1 = board.get_all_chains(current_player=is_current_player_maximizer)
    chains_2 = board.get_all_chains(current_player= not(is_current_player_maximizer))
    for chain in chains_1:
        if len(chain) >= 4:
            return 1100 - board.count_pieces()
    for chain in chains_2:
        if len(chain) >= 4:
            return -1100 + board.count_pieces()
    return 0