Patent attributes
Approaches, techniques, and mechanisms are disclosed for maintaining efficient representations of prefix tables for utilization during the operation of a network device. In an embodiment, the performance of a network device is greatly enhanced using a working representation of a prefix table that includes a prefix index and a plurality of associated prefix arrays. In an embodiment, this working representation is bifurcated across a higher-performing memory for the prefix index and a lower-performing memory for the prefix arrays. In an embodiment, management of this working representation is greatly simplified using a sharded prefix tree that is divided into subtrees based on constraints of the memory in which this working representation is stored. In yet another embodiment, a sharded prefix tree may itself be utilized to more efficiently find a longest prefix match for an input key.