On 8/5/16, 10:24 PM, "bilbosax" <[email protected]> wrote:

>>  You might want to make sure the sparse array doesn't have some
>unintended side effect.
>
>What did you mean by this?  When I run my program the original way, doing
>ALL of the calculations, I get a certain number of matches.
>
>When I am running the programming doing half of the calculations and
>storing
>them in a sparse array, I am not getting the same number of matches.  I
>have
>been staring at this all day and don't see any errors in my code, so I
>thought that I would ask you what you meant by unintended side effects.

I meant that the sparse array might use so much memory or cause more
garbage collection than expected, but sure, this is an unintended side
effect as well.
It might be worth going back to your original code, change the loop to do
half the calculations and see what happens.  This assumes that you really
don't need to separately calculate A vs B and B vs A.

-Alex

Reply via email to