<p>我考虑了下面关于计算机体系结构的问题。假设我用Python</p>
<pre><code>from bisect import bisect
index = bisect(x, a) # O(log n) (also, shouldn't it be a standard list function?)
x.insert(index, a) # O(1) + memcpy()
</code></pre>
<p>这需要<code>log n</code>,如果我正确理解的话,还需要<code>x[index:]</code>的内存复制操作。我最近读到,瓶颈通常是处理器和内存之间的通信,因此内存拷贝可以很快地由RAM完成。是这样的吗?</p>