1. A method comprising: counting a number of times each of a plurality of entries in a content addressable memory (CAM) matches one or more searches; grouping entries in the CAM into a first subset and a second subset based on the number of times each of the plurality of entries in the CAM matches the one or more searches; and searching the first subset for a matching entry and, if the matching entry is not found, searching the second subset for the matching entry.