G'day Mario,

Thanks for the feedback. As mentioned earlier, this was put on hold for a family Easter event; I expect to be working on it again this week.

My main concern with MemUsed() was the bug(s) reported by hv: if I were to present Judy::HS to $work, as a buggy module, which needed patching, and appeared to be abandonware, it probably wouldn't be received too well. Using Memory::Usage instead of MemUsed() would circumvent this problem; other parts of Judy::HS seem solid (from what I've read).

Early results do show that Judy::HS used a lot less memory than %hash.

I initially used /usr/share/dict/australian-english to populate the hash keys. I chose this because it was the largest of several files I have in /usr/share/dict/ (the fact that I'm an Aussie was only a secondary consideration); however, I found that this file has entries with characters outside the 7-bit ASCII range (e.g. Ångström). This required some encoding manipulation for Judy::HS; creating this data structure was slower than for a %hash.

/usr/share/dict/linux.words is the smallest in that directory and, as far as I can tell, only uses 7-bit ASCII. I'll be giving that a try to see how Judy::HS fares against %hash when there's no encoding consideration.

There's other areas I intend to address, which will likely include: reading the data structures with and without encoding; non-integer values; and, complex structures (e.g. HoH).

All very interesting; there should be a Meditation somewhere down the track with results of this investigation.

— Ken


In reply to Re^4: Size of Judy::HS array: where is MemUsed()? by kcott
in thread Size of Judy::HS array: where is MemUsed()? by kcott

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.