Programming with Judy

About Judy
When To Use Judy
Chapter 1 11
Then it can efficiently determine how many prime numbers exist
between any random pair of numbers (prime or not). Because Judy
maintains counts internally, the count function call can return an answer
very quickly.
When To Use Judy
Designing programs with an unbounded array paradigm is one of the
most powerful uses of Judy. Use Judy when your program requires:
Sparse arrays with dynamic or unbounded indexes (0, 1, 2... n)
The ability to scale effortlessly for future growth
Fast search and retrieval
Fast counting and sorting
Good performance across various types of index sets: sequential,
periodic, clustered, and random
Memory efficiency: a low byte-per-index ratio for any array
population
Nearly linear performance from very small to very large populations
Array types Judy offers three types of arrays:
Judy1 functions provide a way to store, retrieve, and locate Boolean
values (bit maps) in a Judy array. See “Using Judy1” on page 28 for
more information.
JudyL functions provide a way to store, retrieve, and locate
long-word values in a Judy array. See “Using JudyL” on page 33 for
more information.
JudySL functions provide a way to store, retrieve, and locate strings
as indexes (similar to associative arrays in awk, Perl and Java).
See“Using JudySL” on page 44 for more information.
3. Counting functions are available in Judy1 arrays (Judy1Count
and Judy1ByCount) and in JudyL arrays (JudyLCount and
JudyLByCount).