def calculate_compare_time_difference(algorithm_time, default_time, algorithm):
    """Calculate the difference between a custom algorithms time taken to sort, and
    pythons sorted() function time taken to sort the same list, returns a readable string
    detailing which was faster.
    """
    difference = algorithm_time - default_time

    if difference > 0:
        return '%s was %s seconds slower.' % (algorithm, difference)
    else:
        return '%s was %s seconds faster.' % (algorithm, -difference)