Technology is disclosed for identifying dynamic groups that correspond to
a user of a system. A system partitions a set of dynamic groups into
multiple test sets of dynamic groups. The system selects a test set and
determines whether the user corresponds to the test set. In one
implementation, the system combines the filters for the dynamic groups in
each test set into a single test set filter. The test set filter is
satisfied if the filter of any dynamic group in the test set is
satisfied. This allows the system to perform a single comparison between
the resulting test set filter and the user's profile to determine whether
the user is a member of any dynamic group in the test set. If the user is
not a member of any dynamic group in the test set, the system eliminates
all of the test set's dynamic groups from consideration, based on the
single comparison. Otherwise, the dynamic groups in the test set remain
in a list of groups that may include the user. This process is repeated
for each test set. After each test set has been evaluated, new test sets
are repeatedly generated and evaluated in the above-described fashion
using the dynamic groups that are still in consideration. In each
iteration, each test set contains fewer dynamic groups. This continues
until each test set only contains one dynamic group. After performing an
iteration with each test set containing one dynamic group, the only
remaining dynamic groups are the ones that include the user as a member.