title: Speed comparison between bisect.insort function and list.index and insert function
body: <p>As Python doc says, I have thought that bisect module is much faster than list built-in method, index and insert to insert item to long ordered list. So, I simply measure the time expense for both functions, <code>bisect_func()</code> and <code>insert_func()</code> like below code.</p>
  
  <p><code>bisect_func()</code> score 1.27s and <code>insert_func()</code> score 1.38s, which is not a dramatic time difference. My question is that do I miss something to test the efficiency of bisect in this example? Or is bisect not the only efficient approach to insert item into an ordered list?</p>
  
  <pre><code>import bisect
  
  HAYSTACK = [n for n in range(100000000)]
  NEEDLES = [0, 10, 30, 400, 700, 1000, 1100, 2200, 3600, 32000, 999999]
  
  def bisect_func():
      for needle in reversed(NEEDLES):
          bisect.insort(HAYSTACK, needle)
  
  def insert_func():
      for needle in reversed(NEEDLES):
          position = HAYSTACK.index(needle)
          HAYSTACK.insert(position, needle)
  
  if __name__ == '__main__':
      import time
      start = time.time()
      # bisect_func()
      insert_func()
      end = time.time()
      print(end - start)
  </code></pre>