I'm trying to implement a high-performance C++ program, each cycle I load 8 bytes to MMX register and then process them, but of course I want to stop when I hit the end of the string.
So this is the solution I found, each cycle load 8 bytes, compare each byte with \0, if there is a \0 then take precautions. The problem with this is, if my data is 4 bytes and in the first cycle I load 8 bytes, then I load 4 bytes from another applications memory space.
Will this cause me trouble? or will just "noise" come from these bytes which is totally acceptable for me, because I will handle it as soon as I learn about \0 character.