Refactor an existing piece of code to improve its performance.
The function below returns unique values in their original order. Replace the inefficient membership-checking approach while preserving its behavior.
def unique_in_order(items):
result = []
for item in items:
if item not in result:
result.append(item)
return result
Input is a list of integers. Return a new list containing the first occurrence of each value.
def unique_in_order(items):