title: How does the hash base and table size affect the time complexity of the hash?
body: <p>I was learning about hash tables last week but I'm wondering what's the best value to pick for the hash base and also the table size for my hash function in order for it to operate on a good time complexity.</p>
  
  <p>Here's the code for my hash function:</p>
  
  <pre><code>h = 0
  for i in range(len(key)):
      h = (h * hashBase + ord(key[i])) % tableCapacity
  return h
  </code></pre>
  
  <p>Why does picking hashBase = 1 increase the time complexity of the hash table's operations? Why is it better to pick a large tableCapacity? Also, why does ie. hashBase = 250726 and table capacity = 250727 cause its operations to slow down?</p>