[IronPython] Dict convertion question

J. Merrill jvm_cop at spamcop.net
Thu Jul 20 12:57:40 PDT 2006


You should really try executing the ToCodeString result ....

At 12:49 PM 7/20/2006, JoeSox wrote
>On 7/20/06, Bruce Christensen <t-bruch at microsoft.com> wrote:
>> What is the nature of the dict that you're trying to save?
>
>It's a <huge dict>
>{4: [6, 4278, 44657, 30279, 58912, 67939, 18551, 33653, 28303, 6692,
>4827, 110144, 18920, 15569, 11571, 77917, 7968, 10137, 14154, 33180,
>12544, 54062, 159370, 9495], 11: [13, 12012, 2752, 97294, 26284,
>11605], 17: [19], 23: [25, 3094, 119638, 38476], 29: [31, 3956, 25199,
>3613, 62246, 89711, 276, 115528], 37: [39, 11431, 25255, 21317,
>41972],.........}
>
>The numbers represent words/predicate nodes when they were first
>indexed. This particular Dict references them in a forward index.
>There is also a backwards index Dict in my project that stores the
>array as the Key. For example:
>
>{[6, 4278, 44657, 30279, 58912, 67939, 18551, 33653, 28303, 6692,
>4827, 110144, 18920, 15569, 11571, 77917, 7968, 10137, 14154, 33180,
>12544, 54062, 159370, 9495] : 4,...}
>
>
>> How many
>> elements does it have, and what data types are those elements?
>
>On average it has around 132,000 keys, and ideally it should be able
>to store more Keys.  I'm not really sure how big the largest array
>Value gets.
>
>> Maybe there's something we can do to improve pickle's performance for you.
>
>Thanks, I'm sure it would benefit some others also.
>-- 
>Later, Joe


J. Merrill / Analytical Software Corp




More information about the users mailing list