I found something a very pit.
Look at the following two codes:
//code1 char s[N]; for(int i=0;i<strlen(s);i++)Do();
//code2 char s[N]; for(int i=0;s[i];i++)Do();
Significance are circulating again strings. but! The former is the complexity of O (N 2 ) , which is O (N) is.
Because the strlen () function time complexity is O (N) of! !
So if you want to use, then we must first put forward to put in front len = strlen (s). Do not like the code as 1! !
massacre
After the change 1984ms-> 85ms