I was surprised how different the speed was in two approaches to exclude one list of tuples for another. So I was wondering why.

I have a list for 1,500 tuples in the form of (int, float), sorted by the `float` value. (ADDED NOTE: each int value in the tuple list is distinct.) I wanted to figure out the fastest way to exclude a sublist. So first I created a sublist to exclude:

```
exclude_list = [v for i,v in enumerate(tuple_list) if (i % 3) == 0]

```

Then I timed two different approaches to removing `exclude_list` from `tuple_list` (but these aren't the two approaches I finally settled on):

```
remainder_list = [v for v in tuple_list if v not in exclude_list]

```

and,

```
remainder_set = set(tuple_list) - set(exclude_list)
remainder_list = sorted(remainder_set, key=itemgetter(1)) #edited to chance key to 1 from 0

```

The difference in time was huge: 14.7235 seconds (500 times) for the first approach and 0.3426 (500 times) for the second approach. I understand why these two approaches have such a different amount of time because the first requires searching through a sub\_list for each item in the main list. So then, I came up with a better way to search/exclude:

```
exclude_dict = dict(exclude_list)
remainder_list = [v for v in tuple_list if v[0] not in exclude_dict]

```

I didn't think this version of excluding list items would be much faster than the first. Not only was it faster than the first approach, but it was faster than the second! It times in at 0.11177 (500 times). Why is this faster than my set-difference/resort approach?