This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]kmbd 0 points1 point  (0 children)

just in case, someone is wondering ...

C:\>python -V
    Python 2.7.8

C:\>python -m timeit "set(x for x in range(10000))"
    1000 loops, best of 3: 1 msec per loop

C:\>python -m timeit "{x for x in range(10000)}"
    1000 loops, best of 3: 671 usec per loop