Sorry, I'll post a complete example. I haven't tried starting Github issues, but I could take it there. Anayway, an example is:
from functools import reduce
from operator import or_
import pandas as pd
s = pd.Series(pd.np.random.randint(100, size=1e6))
%timeit s.isin({1,2})
10 loops, best of 3: 96.2 ms per loop
%timeit reduce(or_, (s==i for i in {1,2}))
100 loops, best of 3: 4.79 ms per loop
For smaller datasets the reduce method isn't faster, but might be slower. E.g at size 1000, .isin is actually faster for me.
Regards