Compression of nodes in a trie structure
First Claim
1. A method for implementing a functional memory, wherein memory data is stored as data units for each of which a dedicated storage space is assigned in the memory, the method comprising:
- implementing a memory as a directory structure comprising a tree-shaped hierarchy having nodes at several different levels, wherein an individual node includes (i) a trie node associated with a logical table wherein an individual element contains a pointer pointing to a lower node in the tree-shaped hierarchy, a number of elements in the logical table corresponding to a power of two, or (ii) a bucket containing at least one element wherein a type of said individual element in the bucket is selected from a group including a data unit, a pointer to a stored data unit, a pointer to another directory structure and said another directory structure;
performing address computation in the directory structure by (a) selecting in the node at an uppermost level of the tree-shaped hierarchy a given number of bits from a bit string formed by employed search keys, forming from the given number of bits a search word for seeking an address of a next node in the individual node, and proceeding to said next node, (b) selecting a predetermined number of bits from unselected bits in the bit string formed by the employed search keys and forming from the predetermined number of bits another search word for seeking another address of a further new node at a lower level from the logical table of the individual node that has been accessed, repeating step (b) until an element containing a nil pointer is encountered or until the address of the new node at said lower level is the address of said bucket, wherein the nodes to which a given node contains pointers are child nodes of said given node and the nodes to which the child nodes contain pointers are grandchild nodes of said given node; and
implementing trie nodes as quad nodes of four elements, and replacing in at least part of the directory structure groups of successive nodes by compressed nodes by (a) replacing an individual group comprising a given quad node and its child nodes by a node whose logical table has 16 elements, and (b) forming a compressed node known per se from said node of 16 elements by physically storing in the compressed node non-nil pointers and a bit pattern on a basis of which a physical storage location in the compressed node, corresponding to the search word, is determined.
1 Assignment
0 Petitions
Accused Products
Abstract
The invention relates to a method for implementing a functional memory and to a memory arrangement. The memory is implemented as a directory structure comprising a tree-shaped hierarchy having nodes at several different hierarchy levels, wherein an individual node can be (i) a trie node associated with a logical table wherein an individual element may contain a pointer pointing to a lower node in the hierarchy, or (ii) a bucket containing at least one element so that the type of an individual element in the bucket is selected from a group including of e.g. a data unit or a pointer to a stored data unit. To optimize the performance of the functional trie structure, the trie nodes are implemented as quad nodes of four elements, and in at least part of the directory structure groups of successive quad nodes are replaced by compressed nodes in such a way that (a) an individual group comprising a given quad node and its child nodes is replaced by a node whose logical table has 16 elements, and (b) a compressed node known per se is formed from said node of 16 elements by physically storing in the node only non-nil pointers and in addition a bit pattern on the basis of which the physical storage location in the node, corresponding to the search word, can be determined. The invention also relates to a structure in which no buckets are used.
51 Citations
30 Claims
-
1. A method for implementing a functional memory, wherein memory data is stored as data units for each of which a dedicated storage space is assigned in the memory, the method comprising:
-
implementing a memory as a directory structure comprising a tree-shaped hierarchy having nodes at several different levels, wherein an individual node includes (i) a trie node associated with a logical table wherein an individual element contains a pointer pointing to a lower node in the tree-shaped hierarchy, a number of elements in the logical table corresponding to a power of two, or (ii) a bucket containing at least one element wherein a type of said individual element in the bucket is selected from a group including a data unit, a pointer to a stored data unit, a pointer to another directory structure and said another directory structure;
performing address computation in the directory structure by (a) selecting in the node at an uppermost level of the tree-shaped hierarchy a given number of bits from a bit string formed by employed search keys, forming from the given number of bits a search word for seeking an address of a next node in the individual node, and proceeding to said next node, (b) selecting a predetermined number of bits from unselected bits in the bit string formed by the employed search keys and forming from the predetermined number of bits another search word for seeking another address of a further new node at a lower level from the logical table of the individual node that has been accessed, repeating step (b) until an element containing a nil pointer is encountered or until the address of the new node at said lower level is the address of said bucket, wherein the nodes to which a given node contains pointers are child nodes of said given node and the nodes to which the child nodes contain pointers are grandchild nodes of said given node; and
implementing trie nodes as quad nodes of four elements, and replacing in at least part of the directory structure groups of successive nodes by compressed nodes by (a) replacing an individual group comprising a given quad node and its child nodes by a node whose logical table has 16 elements, and (b) forming a compressed node known per se from said node of 16 elements by physically storing in the compressed node non-nil pointers and a bit pattern on a basis of which a physical storage location in the compressed node, corresponding to the search word, is determined. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
-
-
13. A method for implementing a functional memory, wherein memory data is stored as data units for each of which a dedicated storage space is assigned in the memory, the method comprising:
-
implementing the memory as a directory structure comprising a tree-shaped hierarchy having nodes at several different hierarchy levels, wherein an individual node includes (i) an internal node associated with a logical table wherein an individual element contains a pointer pointing to a lower node in the tree-shaped hierarchy and a number of elements in the logical table corresponding to a power of two, or (ii) a leaf containing an element of a type is selected from a group including a pointer to a stored data unit, a data unit, and a pointer to a node in another directory structure;
performing address computation performed in the directory structure by (a) selecting in the individual node at an uppermost level of the tree-shaped hierarchy a given number of bits from a bit string formed by the employed search keys, forming from the given number of bits a search word to seek an address of a next node in the individual node, and proceeding to said next node, (b) selecting another given number of bits from the-unselected bits in the bit string formed by the employed search keys, and forming from the another given number of bits another search word to seek another address of a further new node at a lower level from the logical table of the individual node that has been accessed, and repeating step (b) until an empty element is encountered or until the address of the new node at a lower level is the address of the leaf, wherein the nodes to which a given node includes pointers are child nodes of said given node and the nodes to which the child nodes contain pointers are grandchild nodes of said given node; and
implementing internal nodes as quad nodes having four elements, and replacing, in at least part of the directory structures groups of successive nodes by compressed nodes by replacing an individual group comprising a given quad node and its child nodes by a node whose node logical table has 16 elements, and forming a compressed node known per se from said node of 16 elements by physically storing in the compressed node non-nil pointers and a bit pattern on a basis of which a physical storage location in the compressed node, corresponding to the search word, is determined. - View Dependent Claims (14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24)
-
-
25. A memory arrangement for storing data units, said memory arrangement comprising:
-
a directory structure wherein progress is made by using search words formed from a bit string constituted by search keys employed in each case, said directory structure comprising a tree-shaped hierarchy having nodes at several different hierarchy levels, wherein an individual node is (i) a trie node associated with a logical table wherein an individual element contains a pointer pointing to a lower node in the tree-shaped hierarchy, a number of elements in the logical table corresponding to a power of two, or (ii) a bucket containing at least one element so that a type of an individual element in the bucket is selected from a group including a data unit, a pointer to a stored data unit, a pointer to a node in another directory structure, and said another directory structure, wherein some of the trie nodes are quad nodes having a node logical table that includes four elements and some of the trie nodes are nodes having a node logical table that includes 16 elements and wherein non-nil pointers are physically stored in addition to a bit pattern on a basis of which a physical storage location in the node, corresponding to the search word, is determined. - View Dependent Claims (26, 27)
-
-
28. A memory arrangement for storing data units, said memory arrangement comprising:
-
a directory structure wherein progress is made by using search words formed from a bit string constituted by search keys employed in each case, said directory structure comprising a tree-shaped hierarchy having nodes at several different hierarchy levels, wherein an individual node is (i) an internal node associated with a logical table wherein an individual element contains a pointer pointing to a lower node in the tree-shaped hierarchy, a the number of elements in the logical table corresponding to a power of two, or (ii) a leaf containing at least one element of a type selected from a group including a pointer to a stored data unit and a pointer to a node in another directory structure, wherein some of the trie nodes are quad nodes having a node logical table including four elements and some of the trie nodes are nodes having a node logical table that includes 16 elements and wherein non-nil pointers are physically stored in addition to a bit pattern on a basis of which a physical storage location in the node, corresponding to the search word, is determined. - View Dependent Claims (29, 30)
-
Specification