I
Iain
Hi
Hopefully I am missing something really simple with this question, but
here goes.
I have two Bitarrays that I would like to compare. At the moment, I am
XORing one with the other and checking to see if the result has any 1s
in it (if so, the arrays are different). This seems to be faster than
comparing each bit of the two original arrays one at a time. But I
still have to iterate over each element of the array, and I'd like to
do this faster. I've tried using the Equals method but this checks
whether the object references for the arrays are the same, not whether
each element is the same. My code compares millions of bit arrays,
which is why any faster method would be a great help.
Thanks very much in advance for any help.
Iain
Hopefully I am missing something really simple with this question, but
here goes.
I have two Bitarrays that I would like to compare. At the moment, I am
XORing one with the other and checking to see if the result has any 1s
in it (if so, the arrays are different). This seems to be faster than
comparing each bit of the two original arrays one at a time. But I
still have to iterate over each element of the array, and I'd like to
do this faster. I've tried using the Equals method but this checks
whether the object references for the arrays are the same, not whether
each element is the same. My code compares millions of bit arrays,
which is why any faster method would be a great help.
Thanks very much in advance for any help.
Iain