To measure time performance of creating a set from 3 lists, run tox
.
set(A+B+C): 10 loops, best of 3: 656 msec per loop
set(A).update(B, C): 10 loops, best of 3: 602 msec per loop
s = set(A); s.update(B, C): 10 loops, best of 3: 701 msec per loop
s = set(A); s.update(B, C); del s: 10 loops, best of 3: 614 msec per loop
set(itertools.chain(A,B,C)): 10 loops, best of 3: 671 msec per loop
set(A+B+C): 10 loops, best of 3: 470 msec per loop
set(A).update(B, C): 10 loops, best of 3: 586 msec per loop
s = set(A); s.update(B, C): 10 loops, best of 3: 560 msec per loop
s = set(A); s.update(B, C); del s: 10 loops, best of 3: 566 msec per loop
set(itertools.chain(A,B,C)): 10 loops, best of 3: 766 msec per loop