I thought about the following question about computer\'s architecture. Suppose I do in Python
from bisect import bisect index = bisect(x, a) # O(log n)
Use the blist module if you need a list with better insert performance.