for (;;) {
//Something to be done repeatedly
}
我见过这种东西用得很多,但我觉得它很奇怪......说 while(true) 或类似的东西不是更清楚吗?
I have seen this sort of thing used a lot, but I think it is rather strange...
Wouldn't it be much clearer to say while(true), or something along those lines?
我猜(这是许多程序员求助于神秘代码的原因)这会快一点点?
I'm guessing that (as is the reason for many-a-programmer to resort to cryptic code) this is a tiny margin faster?
为什么,它真的值得吗?如果是这样,为什么不这样定义:
Why, and is it really worth it? If so, why not just define it this way:
#define while(true) for(;;)
这篇关于是“for(;;)"比“while(真)"快?如果不是,人们为什么要使用它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
fpermissive 标志有什么作用?What does the fpermissive flag do?(fpermissive 标志有什么作用?)
如何在我不想编辑的第 3 方代码中禁用来自 gccHow do you disable the unused variable warnings coming out of gcc in 3rd party code I do not wish to edit?(如何在我不想编辑的第 3 方代码中禁
使用 GCC 预编译头文件Precompiled headers with GCC(使用 GCC 预编译头文件)
如何在 OS X 中包含 omp.h?How to include omp.h in OS X?(如何在 OS X 中包含 omp.h?)
如何让 GCC 将 .text 部分编译为可写在 ELF 二进制文How can I make GCC compile the .text section as writable in an ELF binary?(如何让 GCC 将 .text 部分编译为可写在 ELF 二进制文件中?)
GCC、字符串化和内联 GLSL?GCC, stringification, and inline GLSL?(GCC、字符串化和内联 GLSL?)