I want to confirm that on a 32-bit machine,
1. compare the value of two byte to see whether they are equal or not;
2. compare the value of two integer (4-byte) to see whether they are equal or not.
(1) and (2) should have the same performance, right? I am using x86 32bit Windows machine to develop native unmanaged C++ application.
thanks in advance,
That's true most of the time at least (always true for regular ints and longs).
The only time it isn't true is when you have a pointer to int say, and that pointer isn't on a 4-byte boundary. On an X86, you just slow down a bit. On other machines, you get a bus error (see another recent post).