如果对代码进行向量化,由于您正在将这些值当作字节进行处理,这意味着每条指令都要一次操作 16 个值!
If you vectorize this code, since you are treating the values as bytes, that means that each instruction will operate on 16 values at once!
斯特拉诺表示,该技术将来可能用于房间照明,甚至可以将树木改造为自供电路灯。该团队希望未来可以开发此技术的新形式,用于喷洒植物叶片,一次操作,终生有效。
The technology, Strano said, could one day be used to light the rooms or even to turn trees into self-powered street lamps. In the future, the team hopes to develop a version of the technology that can be sprayed onto plant leaves in a one-off treatment that would last the plant's lifetime.
请注意这并不要求每一次操作的许可。
We saw some quadratic algorithms, typically those are things with multiple nested loops, or iterative or recursive calls, where you're doing, say, a linear amount of time but you're doing it a linear number of times and so it becomes quadratic, and you'll see other polynomial kinds of algorithms.
我们看过一些平方算法,他们一般进行了多次嵌套循环,或者递归迭代调用,对一个线性操作调用线性次,这样就变成平方次了,以后你们能看到,一些多项式算法。
Seven comparisons, right?
是我花了多少次操作来完成这件事?
And in this case, we go from 8 to 4 to 2 to 1 three times and then on each iteration of this algorithm, each pass across the board I'm touching N numbers, so that means I'm doing N things, log N times.
在这个例子中,我们从8得到4,到2,再到1,是3次,在这个算法的每次迭代中,每一趟我都会操作N个数,也就是所我每次要做N步操作,一共要做,log,N,次。
应用推荐