• <legend id='PiFXB'><style id='PiFXB'><dir id='PiFXB'><q id='PiFXB'></q></dir></style></legend>

    1. <tfoot id='PiFXB'></tfoot>
    2. <i id='PiFXB'><tr id='PiFXB'><dt id='PiFXB'><q id='PiFXB'><span id='PiFXB'><b id='PiFXB'><form id='PiFXB'><ins id='PiFXB'></ins><ul id='PiFXB'></ul><sub id='PiFXB'></sub></form><legend id='PiFXB'></legend><bdo id='PiFXB'><pre id='PiFXB'><center id='PiFXB'></center></pre></bdo></b><th id='PiFXB'></th></span></q></dt></tr></i><div id='PiFXB'><tfoot id='PiFXB'></tfoot><dl id='PiFXB'><fieldset id='PiFXB'></fieldset></dl></div>

      <small id='PiFXB'></small><noframes id='PiFXB'>

        • <bdo id='PiFXB'></bdo><ul id='PiFXB'></ul>
      1. 是“for(;;)"比“while(真)"快?如果不是,人

        时间:2023-09-18

          <bdo id='H1QLP'></bdo><ul id='H1QLP'></ul>
          • <tfoot id='H1QLP'></tfoot>
          • <i id='H1QLP'><tr id='H1QLP'><dt id='H1QLP'><q id='H1QLP'><span id='H1QLP'><b id='H1QLP'><form id='H1QLP'><ins id='H1QLP'></ins><ul id='H1QLP'></ul><sub id='H1QLP'></sub></form><legend id='H1QLP'></legend><bdo id='H1QLP'><pre id='H1QLP'><center id='H1QLP'></center></pre></bdo></b><th id='H1QLP'></th></span></q></dt></tr></i><div id='H1QLP'><tfoot id='H1QLP'></tfoot><dl id='H1QLP'><fieldset id='H1QLP'></fieldset></dl></div>

              <legend id='H1QLP'><style id='H1QLP'><dir id='H1QLP'><q id='H1QLP'></q></dir></style></legend>

                  <tbody id='H1QLP'></tbody>

                  <small id='H1QLP'></small><noframes id='H1QLP'>

                  本文介绍了是“for(;;)"比“while(真)"快?如果不是,人们为什么要使用它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  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(;;)
                  

                  另见:哪个更快:while(1) 还是 while(2)?

                  推荐答案

                  1. 并没有更快.
                  2. 如果您真的很在意,请使用适用于您平台的汇编器输出进行编译,然后看看.
                  3. 没关系.这从来都不重要.随心所欲地编写无限循环.

                  这篇关于是“for(;;)"比“while(真)"快?如果不是,人们为什么要使用它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:哪些(如果有)C++ 编译器进行尾递归优化? 下一篇:C++ 中的常量和编译器优化

                  相关文章

                  最新文章

                • <tfoot id='TPQ4N'></tfoot>

                    <i id='TPQ4N'><tr id='TPQ4N'><dt id='TPQ4N'><q id='TPQ4N'><span id='TPQ4N'><b id='TPQ4N'><form id='TPQ4N'><ins id='TPQ4N'></ins><ul id='TPQ4N'></ul><sub id='TPQ4N'></sub></form><legend id='TPQ4N'></legend><bdo id='TPQ4N'><pre id='TPQ4N'><center id='TPQ4N'></center></pre></bdo></b><th id='TPQ4N'></th></span></q></dt></tr></i><div id='TPQ4N'><tfoot id='TPQ4N'></tfoot><dl id='TPQ4N'><fieldset id='TPQ4N'></fieldset></dl></div>
                    • <bdo id='TPQ4N'></bdo><ul id='TPQ4N'></ul>

                    <legend id='TPQ4N'><style id='TPQ4N'><dir id='TPQ4N'><q id='TPQ4N'></q></dir></style></legend>

                    1. <small id='TPQ4N'></small><noframes id='TPQ4N'>