I can't tell you why the time is different, but I can suggest a different way to code it that might make a difference.
I would consider extracting the entire arrays as 32 bit integer blocks, then loop through the arrays and compare the 32 bit integers as a whole. You might be able to map into the image storage to get to the arrays to avoid making a copy.
Bruce
Bruce Ammons
Ammons Engineering