So, again, there could be constants in here, but just to give you a sense of this.
但是这只是让大家去有个印象,如果我一秒钟运算十亿次。
Let's suppose n is 1000, and we're running at nanosecond speed.
假入我们一秒钟运算十亿次,我们已经看过了对数级,线性增长的。
So each time through the loop, I'm doing three steps. Three basic operations.
因此每次运行这个循环,我做了三次基本运算。
It did a million operations per second.
它能每秒运算1百万次。
Now, the nanosecond is what, 10 to the minus 9 seconds.
一纳秒就是10的9次方分之一秒,而这个电脑一秒可以做2G次运算。
应用推荐