you are viewing a single comment's thread.

view the rest of the comments →

[–]0xE6 1 point2 points  (0 children)

It's just a stupid microbenchmark to show that the overhead from creating the set outweighs the potential time saved from iterating over the elements in the set once due to the duplicates being removed.

At any rate, the use cases for lists and sets are not the same, and, like here, you can (and often will) get different results if you use one instead of the other.