Judy(3X) | Judy(3X) |
Judy1 - maps an Index (word) to a bit JudyL - maps an Index (word) to a word JudySL - maps an Index (string) to a word
For Judy1 functions and JudyL functions, Index should be declared as a Word_t type. Word_t is defined in the Judy.h header file as a 32- or 64-bit unsigned native integer, and has the same number of bits as a pointer.
For JudySL functions, each index is a null-terminated string.
Judy arrays are both speed- and memory-efficient, with no tuning or configuration required, across a wide range of index set types (sequential, periodic, clustered, random). Judy's speed and memory usage are typically better than other data storage models such as skiplists, binary trees, b-trees, or even hashing, and improves with very large data sets.
A Judy array is created merely by defining a null pointer and then storing (inserting) the first element into the array under that pointer. The memory used by a Judy array is proportional to the population (number of elements).
Judy has two Application Program Interfaces (APIs): a C macro interface, and a function call interface. Because the macro forms are faster and have a simpler error handling interface than the equivalent functions, they are the preferred way of calling the Judy functions.
Since an initial (empty) Judy array is represented by a null pointer, it is possible to construct an array of Judy arrays. In other words, a Judy array's values (except Judy1) can be pointers to other Judy arrays.