I'm assuming that whoever wrote these Perl Judy scripts in the first place has now left your company, and without providing a comprehensive handover. Am I close?

You've asked two questions now on Judy arrays and neither has convinced me you have the technical chops required to take over this project. Maybe it's time to step back and look at the bigger picture. Do you really really need the performance boost that Judy arrays provide? Is this required performance boost clearly documented? Are benchmarks provided demonstrating why? Is there a strong business case? Or was it just a fun project to play with by a clever former employee?

If you don't really need the performance boost of Judy arrays, you might consider converting the code to simply use Perl hashes instead because that would make long term code maintenance easier for your company as employees come and go over time.

Having said that, the Judy array code looks like it was written by an expert (Doug Baskins) and appears to be very stable ... still, you may struggle to get quick support if you hit a bug.

BTW, one quote from the infamous BrowserUk scared me:

A supersearch for my name and judy arrays will turn up a compact, single file version of the Judy array code that compiled clean and worked very well for that application. Still slower than hashes, but far more compact. Just hope you don't find any bugs, because the Judy code is horribly complex.

Having got that off my chest, I find high performance fun, and I've never used Judy arrays, so I've put together some basic references below that I might play with later when I get more time.

BrowserUk on Judy arrays:

Judy arrays on PM:

Judy arrays on CPAN:

Building the Judy C Library on Linux

Notes below based on Re: Rosetta Code: Long List is Long - JudySL code by marioroy.

Introduction to Judy C Library: Judy Arrays Web Page

Download the Judy library (Judy-1.0.5.tar.gz) from: sourceforge Judy

Example build of the Judy C Library on Ubuntu Linux:

cd $HOME/local-judy tar -xzf Judy-1.0.5.tar.gz cd judy-1.0.5 ./configure --enable-64-bit make sudo make install

Example compile and run of a C++ program on Linux that uses the Judy library (taken from my-rosetta-code-notes):

clang++ -o llil4judy -std=c++20 -fopenmp -Wall -O3 llil4judy.cpp -I "$ +HOME/local-fast_io/fast_io/include" -I "$HOME/local-boost/boost_1_81_ +0" -I /usr/local/include -L /usr/local/lib -l Judy LD_LIBRARY_PATH=/usr/local/lib ./llil4judy big1.txt big2.txt big3.txt +>f.tmp


In reply to Re: need help with judy array searching (Judy Array References) by eyepopslikeamosquito
in thread need help with judy array searching by expo1967

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.