If I use byte instead int, will my loop iterate faster?
java
Solution
No, not at all; if anything, it will be slower, because the underlying hardware generally has instructions for working with the native "int" type (32-bit two's complement integer) but not for working with 8-bit signed bytes.
Problem
Does this code, ``` for (byte b = 0; b < 100; b++) { //some code } ``` run faster than this code? ``` for (int b = 0; b < 100; b++) { //some code } ```