为什么有些人这样做:
char baa(int x) {
static char foo[] = " .. ";
return foo[x ..];
}
Run Code Online (Sandbox Code Playgroud)
代替:
char baa(int x) {
char foo[] = " .. ";
return foo[x ..];
}
Run Code Online (Sandbox Code Playgroud)
在linux源代码应用程序上看起来很常见.有性能差异?如果有,有人可以解释原因吗?提前致谢.