The new loop code has two fewer operations per iteration, which can lead to increasing performance gains as the number of iterations increases.
新循环代码每次迭代中减少两个操作,随着迭代次数的增长,性能将显著提升。
Because the hint is before the loop body, this code leaves your hint active for every iteration of the loop, but it only has to use one cycle.
由于提示位于循环体之前,因此这段代码将使提示对于循环的每次迭代都保持活动状态,不过它只使用了一个周期。
For example, the code in Listing 3 prints a note after each number in the loop.
举例来说,清单3中的代码会在循环中为各编号输出一个说明。
Then, break the execution and find the assembly code representing the infinite loop.
然后,中断执行并找到表示该无限循环的汇编代码。
For tasks that execute code in a loop, it is common to check for interruption only once per loop iteration.
对于执行一个循环中的代码的任务,通常只需为每一个循环迭代检查一次中断。
It is entirely possible to stop, refactor, be a little behind on features, slam in a few features, not catch up but screw up the code, and loop forever, never getting benefit.
停下来、重构、稍微落后于特性、专注于少量特性、不赶进度而是优化代码,如此循环往复,却从来不受益;这样的状况完全有可能。
For loop conformance, consider the code snippet in Listing 3.
对于循环的一致性,可以考虑清单3中的代码片段。
The key is that the loop and network sockets need a lot of management code to ensure that you are listening, updating, and controlling the different connections and interfaces.
关键在于循环和网络套接字需要大量管理代码,这样才能监听、更新和控制不同的连接和接口。
Some memory leaks occur due to program errors in which infinite loop in the application code allocates new objects and adds them to a data structure accessible from outside the program loop scope.
有些内存泄漏是由于程序错误发生的,在存在此类错误的情况下,应用程序代码中的无限循环会分配新的对象,并将其添加到可从程序循环范围外面访问的数据结构中。
While it might be possible to identify the memory leaking data structure by analyzing the heap dumps, identifying the memory leaking code which is in a infinite loop is not straightforward.
虽然通过分析堆转储能够标识内存泄漏数据结构,但是标识无限循环中的内存泄漏代码并不简单。
In this example, the code block is iterated until the loop is broken through the condition.
在此示例中,代码块迭代,直至循环根据条件而中断。
In contrast, the code in Listing 4 puts a note at the end of the loop.
相反,清单4中的代码会在循环结束处输出一条说明。
In particular, with the code in Listing 4, the JVM can track how many times each loop is executed.
尤其是,对于清单4中的代码,JVM可以跟踪执行每个循环的次数。
The comments in Listing 5 merely tell the reader what the code is doing - that it's iterating through a loop or that it's adding a number.
清单5中的注释仅告诉读者代码在做什么—它正在通过一个循环进行迭代或添加一个数字。
Your code should (almost) never have multiple nested loops (a loop inside a loop inside a loop). Most of the code written today should use Hashtables, simple lists and singly nested loops.
在编写代码时应尽量避免嵌套循环,目前大多数代码都是使用了哈希表、简单链表和单循环。
The code snippet in Listing 2 shows a loop to process every project in a DOAP file (normally, there's only one) and output data inside a element in an XML document.
清单2中的代码片断展示了一个循环,该循环用于处理DOAP文件中的每个项目(通常只有一个项目),并输出XML文档中由元素括起来的数据。
Well I ought to be able to do that by simply generalizing the loop. And that's what the next piece of code on your a hand out shows you.
好的通过生成这个循环,我应该能够达到目的,这也是你们的讲义中下一段代码。
Improving the performance of this loop is very simple and doesn't even require an additional line of code (see Listing 9).
提高循环性能的方法很简单,甚至不需多加一行代码(见清单9)。
The code for the loop is displayed in Listing 12.
清单12展示了该循环的代码。
All right, you can see that this little piece of code, it's got a loop in there, and what's it doing?
好,你们看到的这一小块代码,是做了一个循环吧?,他在做什么?
For example, code that might go into an infinite loop, or otherwise use excessive resources, must be wrapped in testing code that will detect such eventualities.
例如,必须在专门的测试代码中捕捉到占用大量资源的无限循环代码。
In the main program loop, there is no need for the code that ignores the header lines and the first two lines of input.
在主程序循环中,代码无需忽略标题行和输入的前两行。
Let's say you're going to time 200,000 iterations through a loop, and the compiled code is 10 times faster than the interpreted code.
假设您正在通过循环计时200,000次迭代,编译代码比解释代码快10倍。
Loop repeats the cycle with a newly generated random code until a scan of the rows does not produce a match.
Loop使用一个新生成的随机码重复这个循环,直到行扫描不再生成匹配值。
The compiler translates this code into the equivalent iterator-based loop, as shown in Listing 2.
编译器把这个代码转换成等价的基于迭代器的循环,如清单2所示。
Add protocol-specific elements, transactions, a loop, a comment, conditional processing, and custom code.
添加特定协议元素、事务、循环、注释、条件处理和定制代码。
When the loop is finished, the code will have a fully populated Channel object and a list of fully populated Item objects.
循环结束时,代码将拥有一个完全填充的Channel对象和一个完全填充的Item对象列表。
This makes the SELECT clause a code loop.
这使select子句成为代码循环。
For a while loop, however, this means the code in the else clause is executed once, after the loop is terminated (see the pseudocode shown in Listing 7).
但是对于while循环,这意味着在循环终止后,else子句中的代码被执行一次(参见清单7中的伪代码)。
For a while loop, however, this means the code in the else clause is executed once, after the loop is terminated (see the pseudocode shown in Listing 7).
但是对于while循环,这意味着在循环终止后,else子句中的代码被执行一次(参见清单7中的伪代码)。
应用推荐