def simplify_vector_length(vector, final_length):
    """
    Function to resize a vector to a final_length.
    Speed test result in 5,41s for len(vector) = 100 000 000

    Parameters
    ----------
    vector : iterable
        The vector to be simplify.

    final_length : int
        The length of the return vector.

    Returns
    ----------
    simplified_vector : list
        vector with final_length length.
    """

    diff = len(vector) - final_length
    if diff <= 0:
        return vector

    # Skim the middle
    diff = len(vector) - final_length
    number = final_length / diff
    simplified_vector = [vector[0]]
    counter = 0
    for p in range(len(vector)):
        if counter >= number:
            counter -= number
            continue
        simplified_vector.append(vector[p])
        counter += 1
    if simplified_vector[-1] != vector[-1]:
        simplified_vector.append(vector[-1])
    return simplified_vector