Patent ID: 6895442

Claim:
A computer program product for providing fast and efficient address lookup for an address comprised of a plurality of address components and wherein each address component is deemed to be more significant than its next-sequential neighboring address component, the computer program product embodied on one or more computer-readable media and comprising: computer-readable program code means for creating a plurality of arrays comprising an array for each of the address components, wherein each array comprises a plurality of entries which are indexed using values of the address component for which the array was created, further comprising: computer-readable program code means for obtaining a particular address value to be represented in the plurality of arrays; computer-readable program code means for obtaining a bit mask associated with the particular address value; computer-readable program code means for indexing into a highest-order one of the arrays using a most-significant component of the particular address value as an index element; computer-readable program code means for setting a flag associated with the index element to on if the bit mask indicates that the next-sequential neighboring address component is considered significant, and for setting the flag to off otherwise; and computer-readable program code means for repeating the indexing and setting, using the next-highest-order one of the arrays and the next-most-significant component of the particular address value, while the bit mask indicates that the next-sequential neighboring address component is considered significant, and for (1) storing information associated with the particular address value in a storage or memory location and (2) setting a pointer field associated with the index element to point to the storage or memory location, otherwise; and computer-readable program code means for retrieving the stored information associated with a selected address value from the plurality of arrays, further comprising: computer-readable program code means for obtaining the selected address value; computer-readable program code means for obtaining a selected bit mask associated with the selected address value; computer-readable program code means for indexing into the highest-order one of the arrays using the most-significant component of the selected address value as the index element; and computer-readable program code means for determining that no result is available if the index element has no stored information, and for continuing otherwise, wherein the continuing further comprises: computer-readable program code means for checking the flag associated with the index element; and computer-readable program code means for returning the stored information from the storage or memory location pointed to by the pointer field when the flag is set off or for repeating the indexing and determining, for the next-highest-order one of the arrays and the next-most-significant component of the selected address value, when the flag is set on.