Let's suppose n is 1000, and we're running at nanosecond speed.
假入我们一秒钟运算十亿次,我们已经看过了对数级,线性增长的。
Light travels basically a foot in a nanosecond. Simple rule of thumb.
光行进的速度是每纳秒一英尺,很简单的经验法则了。
If I'm running at nanosecond speed, 1000 n, the size of the problem, whatever it is, is 1000, and I've got a log algorithm, it takes 10 nanoseconds to complete.
如果这个问题的规模,也就是n,是,如果这个问题是对数级的,这将会占据10纳秒的时间,你一眨眼的时间。
Now, the nanosecond is what, 10 to the minus 9 seconds.
一纳秒就是10的9次方分之一秒,而这个电脑一秒可以做2G次运算。
应用推荐