Are there some big win optimisations we should be doing here?  For example, if its a CNF, as soon as we hit a true condition within a group we don't need to evaluate any more conditions in that group.  Similarly if its a DNF, as soon as we hit a false condition we can ignore all other conditions in that group.