I have a long list that is continually updated (one element at a time). From this list I continually need to get the set of unique values for a subset of the list items (for example, the unique names of boys, and the list is all boys + girls). Currently using a set comprehension and it is causing an effing speed bottleneck. Someone suggested using a Collections.counter instead. Agree/disagree/other ideas?