消除循环的低效率的一个常见策略是代码移动(code motion),其包括识别要执行多次,但计算结果不会改变的运算,可以将计算移动到代码前面不会被多次求值的部分。
基于78个网页-相关网页
·2,447,543篇论文数据,部分数据来源于NoteExpress
通过将JSTL代码移动到输出元素的可重用标记文件中,就可以将此代码片段缩减为一行。
This code fragment can be reduced back to a single line by moving the JSTL code into a reusable tag file that outputs the element.
由于会反复调用该类,因此应将初始化 WebSphere TX API 的代码移动到一个静态块中
Since this class will be invoked repeatedly, move the code that initializes the WebSphere TX API into a static block
当我决定使用 acmecorp.biz/geotweet 之类的 URL 将得到的代码移动到生产环境中时,我将需要生成另一个键。
When I decide to move the resulting code into production — with a URL like acmecorp.biz/geotweet — I'll need to generate another key.
Given the code up there, if I want to move a tower of size n, what do I have to do?
鉴于这里的代码,如果我想移动N个圆盘,我该怎么做?
应用推荐