I have two Javascript ArrayBuffers; each contains 512 bits of data. I would like to do an xor comparison of the two arrays and store the results in a third array.
Currently, I am looping over the elements in the buffers. In the code below 'distance' is an integer and feat_a1
and feat_b1
are ArrayBuffers that are 512 bits in length.
for(var d1=0; d1<512; d1++){
distance += feat_b1[d1] ^ feat_a1[d1];
}
Is there a more efficient way of doing the pairwise comparison of these two arrays?