1. A method, comprising: in a memory configuration circuit, performing operations including grouping a set of content addressable memory (CAM) rules into a plurality of subsets, wherein for each subset, bits in each of the CAM rules can be reordered, according to a common bit ordering, to place all wildcard bits in least significant bit positions; for each of the plurality of subsets, reordering bits of each CAM rule in the subset, according to a respective bit ordering for the subset, to produce a reformatted subset; storing the reformatted subset in a respective algorithmic CAM circuit; and configuring a search key formatting circuit to, in response to receiving a search key: reformat the search key, according to the respective bit ordering for the subset, to produce a reformatted search key; and input the reformatted search key to the respective algorithmic CAM circuit storing the reformatted subset.