I'm using libpcap to analyze and process packets. I have to compare two arrays of unsigned chars, take the difference and save it to a hashtable. Another thread will periodically scans across the hashtable and compute for average,standard deviation, max and min.
My question is the following, what would be the most efficient way to perform subtraction on two arrays?
For example:
A="0x34 0x44 0x59 0x5B"
B="0x34 0x42 0x43 0x43"
My first thought is to convert it to an integer, by converting the array into an array of signed chars, doing take requires a function to perform lookup function. Because this is function is called for every packet received on the system.