title: Why bubble sort is faster than quick sort
body: <p>I try to sort my list using two algorithms of sort: bubble and quick.<br>
  For this purpose i use <code>algorithms</code> module and <code>bubble_sort</code> , <code>quick_sort</code> respectively. As I know complexity of first algorithm is <code>n^2</code> and second is <code>n*log(n)</code>. But i get unexpected output from this code:</p>
  
  <pre><code>from algorithms.sorting import bubble_sort, quick_sort
  import time
  
  my_list = [1, 12, 33, 14, 52, 16, 71, 18, 94]
  start1 = time.time()
  for i in range(1000000):
      bubble_sort.sort(my_list)
  
  end1 = time.time()
  start2 = time.time()
  for i in range(1000000):
      quick_sort.sort(my_list)
  
  end2 = time.time()
  
  print('Bubble sort:', end1 - start1)
  print('Quick sort:',end2 - start2)
  </code></pre>
  
  <p><strong>Output:</strong></p>
  
  <pre><code>&gt;&gt;&gt; Bubble sort: 7.04760217666626
  &gt;&gt;&gt; Quick sort: 8.181402921676636
  </code></pre>
  
  <p>Why in this case bubble sort is faster than quick sort?</p>