We are talking about speed-sensitive code here. Wouldn't it be faster to check for `little_endian` outside the loop (and thus have two loops)?