Patent ID: 8380737

Claim:
A computer program product for computing a set intersection of sets of numbers, the computer program product comprising a computer readable storage device having computer readable program code embodied therewith, the computer readable program code comprising: computer readable program code configured with an interface for computing a set intersection and returning the set intersection to an application calling the interface; the interface configured to receive as input a first set of discrete numbers in an input range and a second set of discrete numbers in the input range; the interface configured to separate the input range into one or more sub ranges to cover the input range and configured to process a first one of the one or more sub ranges by initializing bits of a first memory to a first logical state, the first memory having at least a corresponding bit for each respective discrete number that may be received within the first sub range, and wherein the processing includes changing the initial state of each of the bits in the first memory corresponding to a received number of the first set that is within the first sub range; the interface configured to compare each number received in the second set to a corresponding bit in the first memory to identify a set of received numbers that are in the first sub range and that are in both the first set and the second set, wherein the comparing is responsive to detecting a change of initial state of any bit in the first memory during the processing of the first sub range; and the interface configured to repeat the processing and the comparing for each remaining one of the one or more sub ranges and to return to the application a set of received numbers that are in both the sets.