例如,通过对那些经常调用的函数进行优化,您就可以用最少的努力来获得最佳的性能。
For example, by optimizing those functions that are called most often, you can get the greatest performance benefit from the least amount of effort.
在本文中,我将继续讨论这些概念,讲解一级函数、优化和闭包。
In this article, I'll continue this tour of concepts by talking about first-class functions, optimizations, and closures.
使用带有repeat前缀的字符串指令将该函数优化成一个非常紧密的循环。
This function is optimized as a very tight loop using string instructions with the repeat prefix.
第一部分说明所找到的解决方案是整型优化的,为目标函数找到的最小值是23。
The first section says that the solution found is integer optimal, and that the value found for the objective function is 23, a minimum.
一次只尝试放松每个边界约束一个单位,解决修改后的问题,看一下目标函数的优化值发生了什么变化。
Try relaxing the value of each bounded constraint one at a time, solve the modified problem, and see what happens to the optimal value of the objective function.
然而,优化决策是各种属性的复杂函数,这些属性包括数据库环境、查询特征以及数据本身。
However, optimization decisions are a complex function of various attributes, including the database environment and query characteristics, as well as the data itself.
而在Erlang中不需要使用循环,因为尾递归函数会被自动优化在固定的空间中运行。
In Erlang there is no need for loops because tail recursive functions are transparently optimized to run in constant space.
有选择性地绑定那些可以从Psyco的优化中获得最大收益的函数,这样会好得多。
It is far better to selectively bind those functions that can benefit most from Psyco's optimizations.
always_inline让GCC以内联方式处理指定的函数,无论是否启用了优化。
Always_inline tells GCC to inline the specified function regardless of whether optimization is enabled.
放松限制的目标函数(不将决策变量当作整数考虑)的优化值同时也给出来了。
The optimal value of the relaxed objective function (the one that didn't consider the decision variables as integers) is also printed here.
编译器现在还允许在函数级(而不是在之前默认的文件级)定义一个优化级别。
The compiler will also now allow you to define an optimization level at the function level (instead of at the file level, which was the previous default).
例如,前面描述的 print_report_i函数在GCC 3.4 中使用-O2 进行尾部调用优化编译,因此运行时使用的栈的大小是固定的,而不是线性增长的。
For example, the print_report_i function described earlier compiled with tail-call optimization using -O2 on GCC 3.4 and therefore runs with a stack-size that is constant, not growing linearly.
第二种形式把func作为标准的python函数,但是优化了涉及newname的调用。
The second form leaves func as a standard Python function, but optimizes calls involving newname.
我们看到了定义这些函数的更规则的语法,这可以通过操作码缓存来优化性能。
We see a much cleaner syntax for defining these functions, which can be optimized for performance by opcode caches.
实验结果表明,与文献算法相比,该算法在处理高维函数优化时具有更强的寻优能力和更高的搜索精度。
Simulations show that proposed algorithm has more powerful optimizing ability and higher optimizing precision in high-dimensional function optimization than literature algorithms.
许多实际工程问题可以抽象为相应的函数优化问题。
Many practical engineering problems can be abstracted to corresponding function optimization problems.
微粒群优化算法是求解连续函数极值的一个有效方法。
Particle Swarm Optimization (PSO) algorithm is a powerful method to find the extremum of a continuous numerical function.
多峰值函数的极值问题一直是优化领域中的一个难点和热点。
Extremum problem of multimodal functions is a difficult issue in optimization fields.
在本文中,您已了解到不同测试及函数如何影响规则的执行时间,以及如何使用不同方法来优化执行时间。
You have seen in this article how different tests and functions impact the execution time of rules, and how you can use different approaches to optimize execution time.
如果框架(或者—如果您选择一门函数语言,如Clojure或Scala—语言)能优化底层实现,那么您就可以自动从中获益。
If the framework (or - if you choose a functional language such as Clojure or Scala - the language) can optimize the underlying implementation, you automatically benefit.
DB 2优化器知道那些条件,它可以断定多次调用那个函数不会有害。
The DB2 optimizer is aware of those conditions and it could decide that it does not hurt to call the function several times instead of just once.
注意:优化器不会对下面这个查询使用函数索引。
Note: Here is a query for which the optimizer cannot consider using the functional index.
优化器将根据行中列的函数依赖性来推断关键值选择。
The optimizer will deduce key value selection based on the functional dependency of the column within the row.
优化应该主要针对程序中最经常运行的部分,尤其是被内部循环反复调用的函数。
The optimizations should be done on those parts of the program that are run the most, especially those methods which are called repeatedly by various inner loops that the program can have.
实验结果表明,改进的混合蛙跳算法对复杂函数优化问题具有较强的求解能力。
The experimental results show that the improved SFLA has a better capability to solve complex functions than other algorithms.
经试验验证,采用幂函数的辊形优化曲线可提高支撑辊使用寿命,并有利于板凸度和板形控制。
The results we obtained prove that the power function curve can not only improve the service life of the backup roll but also benefit the profile and shape control of hot rolled strip.
边界约束阻碍了目标函数达到更为优化的值。
A bounded constraint prevents the objective function from reaching a better value.
关于性能的规则总是:先让它跑起来,然后让它正确(比如小函数),然后让它快起来(优化)。
The rule of performance is always: make it run, make it right (e. g. small methods), make it fast (optimize).
否则,Xalan可能会优化掉扩展函数的调用,根本不会调用这个函数。
Otherwise, Xalan can optimize away the invocation of the extension function and not call it even once.
通过混合使用多种杂交算子并辅之以间歇变异,提出了一种求解高维复杂函数全局优化问题的新型演化算法。
A new evolutionary algorithm based on hybrid crossovers and intermittent mutation for global optimization of complex functions with high dimensions is proposed.
应用推荐