If I understand your question correctly, it seems that you wish to check if all elements of an array column are between the characters 'a' and 'h' and are identical, and you want to optimize this process.
Should you happen to know some assembly language, I strongly recommend using a disassembler to find out what exactly is occurring in your function during execution. All compilers and optimization levels are slightly different. However, a bare minimum of operations for a comparison of two values in memory would consist of:
. loading the two variables in memory to the processor registers (several clock cycles)
. performing an equality test on the values in the two registers (1 clock cycle)
. executing a jump command based on the flags register (intel processors)(another clock cycle)
Now this is about as simple of an operation as you can get for a processor, but since you have stacked comparison operations, the time required for these checks accumulate (particularly the clock cycles needed for memory access.
Therefore, to reduce the time needed for these comparisons, one needs to reduce the number of comparisons. Remember that characters 'a' through 'h' have ascii values between 0x61 and 0x68 (decimal 97 to 104). You can ascertain if a character is between 'a' through 'h' in about three comparison operations by:
if(arr[r][c] >= 97 && arr[r][c] <= 104)
Check only one value of the column and use this bit-twiddling trick to determine if all elements in the column are the same:
if(((arr[r][c] ^ arr[r][c+1]) + (arr[r][c] ^ arr[r][c+2]) + ...*etc*) == 0)
The "xor"('^') comparison takes a single clock cycle, as does addition, and if there are any dissimilarities between any two column entities, the operation will result in a nonzero result. This method should increase in linear time with number of column elements, and as an added bonus an optimizing compiler might be able to keep 'arr[r][c]' in one of the registers during the operation.