increasing efficiency of code that finds the intersections of tokens in entities of two different data sets