in reply to Avoiding if/else knots
After spending a while thinking about it (load the problem into memory; take it home; let it run in the background) I saw that at the heart of the problem I was filtering things. I don't know if that's quite the same for you (not enough details in the OP). I essentially had a request that was looking for things that had a certain set of attributes. I was comparing the attributes of the request to the attributes of each item in the list to find matches and count matches / misses accordingly. I worked up a solution that defined a record filter by setting up a bit mask indicating which attributes I was looking for. Then as I looked at each record that I needed to filter, I set bit flags according to the attributes of the record. Then a bit-wise & told me if I got a match.
Assuming that this even comes close to resembling your problem, you could use the discrete bit-wise results as keys in you dispatch table. The values would be the methods to dispatch to for each case.
Sr. Software Engineer, DAS Lead
WhitePages.com, Inc.