Timer('set(q) <= set(d)', 'D=1000000;Q=100;' + setup).timeit(1)
Timer('set(q) <= d.keys()', 'D=1000000;Q=100;' + setup).timeit(1)
Timer('all(k in d for k in q)', 'D=1000000;Q=100;' + setup).timeit(1)
python: How do I check that multiple keys are in a dict in one go?