Path: README.rdoc
Modified: Tue Oct 22 09:18:01 CDT 2002


RJudy is a Ruby extension module that provides an interface to the Judy arrays library. Judy's home page is at

Judy was originally implemented at Hewlett-Packard, and was subsequently open-sourced in June 2002 (with an LGPL license). Doug Baskins, the author of the Judy algorithm, has written a nice summary (see of what makes Judy arrays so fast, and why you might want to use them.

Build and Installation Instructions

Before you can build, install and use this extension module you'll need to first obtain and install the Judy header files and library. The source tarball for the latest version of Judy can be found at its SourceForge project page ( If you get lucky, you may also be able to find precompiled binaries for your platform.

Once you've built and installed Judy itself, you should be ready to build and install this extension module. From the top-level directory, first configure the build by typing:

    ruby install.rb config

Next, start the build process by typing:

    ruby install.rb setup

Finally, install it by typing:

    ruby install.rb install

Note that on Unix systems, you'll probably need to be logged in as "root" for that last step.


Once you've built and installed RJudy, you can use any of its bundled classes (Judy1, JudyL or JudySL) by simply require-ing the "judy" feature, i.e.

    require 'judy'

    judy1Array  =
    judyLArray  =
    judySLArray =

For a listing of the instance methods for each of these classes, refer to their respective documentation pages. For more background information about Judy arrays, refer to the Judy home page.

Test Suite

Test cases for each of the Judy classes are provided in the "tests" subdirectory. These tests use the Test::Unit framework, available for download from

To run one of the individual tests, type something like:

    ruby TC_JudyL.rb

To run all of the tests, type:

    ruby TS_All.rb

You shouldn't get any failures; if you do, please contact and let him know about it!



RJudy is Copyright (c) 2002 by Lyle Johnson, and is provided under the GNU Lesser General Public License ( See the LICENSE file in the top-level directory of the RJudy source distribution for more details.

Change History

Changes Since Version 0.1