In my current code I have something like this
while(true) //Infinite loop
{
char buff[60];
.....
....
}
I wanted to know what would be better performance wise.
- Declaring the char buff (that will hold strings that contain linefeeds and new line character) before entering the infinite loop and then using
memset(buff, 0, 60);
or - Keeping it the way it is. Does memset affect performance ?
Note:
My requirement is that I need to have the char
array totally clean everytime the loop restarts.