Christoph:

I would do it as follows:

        Word_t   NextIndex;
        int          Rc;
        Pvoid_t  J1ToArray;

        J1ToArray = NULL;                        // Initialize To array
        NextIndex = 0;                              // start at beginning
        J1F(Rc, J1FromArray, NextIndex);  // return first Index
        while (Rc)
        {
            J1S(Rc, J1ToArray, NextIndex);
            J1N(Rc, J1FromArray, NextIndex);
        }  

You will be surprised how fast it is -- much faster that the time to build 
"from"
array because it is done in sorted order -- and thus all in the Cache.
 
Good Luck,

Doug Baskins


Christoph Bartoschek <[EMAIL PROTECTED]> wrote: Hi,

what is the correct way to copy a Judy1 array? Can one just malloc() the 
memory for Judy1MemUsed() bytes and use memcpy()?

Greetings
Christoph Bartoschek

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Judy-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/judy-devel



Doug Baskins <[EMAIL PROTECTED]>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Judy-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/judy-devel

Reply via email to