For service pack 1, Microsoft has introduced a new heuristic based on code size and whether or not the call is in a loop.
在Service Pack 1中,微软引入了一个新的基于代码尺寸的启发式算法,来判断调用是否处于一个循环中。
So when the program starts to loop through the files, perhaps to determine the directories overall size, it has to requery the file system one by one.
所以,在程序开始遍历这些文件的时候,假设为了确定目录的总大小,就必须逐一重新查询文件系统。
The main method USES an enhanced for loop to iterate through the different primitives and a simple switch statement on the current instance to set the size value of each primitive.
main方法使用增强的for循环来迭代通过不同的原语,并在当前实例上使用一个简单的switch语句来设置每个原语的大小值。
Now this happens to be what we would call a linear process, because the number of times I go around the loop is directly related to the size of the argument. If I double 2 the argument, I'm going to double the number of times I go around the loop. If I increase it by five, 5 I'm going to increase by five the number of times I go around the loop.
这恰好是我们会成为,线性复杂度程序的一个例子,因为我要执行循环的次数是,和输入的参数的大小直接相关的,如果我将这个参数乘以,那么我就要将进行循环的次数也乘以2了,如果我把参数加上,那么循环的次数也要加上5了。
应用推荐