Explain how you optimize your code for performance and scalability.
Implement the function below as a scalable solution that removes duplicate values while preserving the first occurrence of each value. The function must return a new list and must not modify the input.
Input: a list of hashable values. Output: a list containing each distinct value once, in original order.
def deduplicate(values):