Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

comment on

( [id://3333] : superdoc . print w/replies, xml ) Need Help??

Do Judy arrays index from 1 instead of zero? Subtracting 1 from the key works without error.

perl -MJudy::L=Set -E 'Set($j, (1<<63)-1, 123); say $j' 94763462791888

And possibly not relevant, but I see these overflow warnings when compiling:

ib/Judy.xs:54:37: note: in definition of macro ‘OOGA’ 54 | PerlIO_printf(PerlIO_stdout(),__VA_ARGS__);\ | ^~~~~~~~~~~ lib/Judy.xs: In function ‘XS_Judy__HS_Delete’: lib/Judy.xs:46:26: warning: overflow in conversion from ‘long unsigned + int’ to ‘int’ changes value from ‘16045690984833335023’ to ‘-5590387 +37’ [-Woverflow] 46 | # define DEADBEEF 0xdeadbeefdeadbeef | ^~~~~~~~~~~~~~~~~~ lib/Judy.xs:46:26: note: in definition of macro ‘DEADBEEF’ 46 | # define DEADBEEF 0xdeadbeefdeadbeef | ^~~~~~~~~~~~~~~~~~

Perl version:

perl -v | grep This This is perl 5, version 36, subversion 0 (v5.36.0) built for x86_64-li +nux

In reply to Re: Unsigned 64-bit integer as Judy key by swl
in thread Unsigned 64-bit integer as Judy key by Anonymous Monk

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.