title: Is it faster to hash a long string for comparisons or compare the two strings?
body: <p>Let's say I have a list of very long strings (40-1000 characters). A user needs to be able to enter a term into the list and the list will report whether the term exists.</p>
  
  <p>Barring storage, is it more efficient to store a hash alongside the long strings, and then when a user attempts a lookup it hashes the input and compares it to a list of hashes?</p>
  
  <p><a href="https://stackoverflow.com/questions/658065/is-it-faster-to-search-for-a-large-string-in-a-db-by-its-hashcode">There are similar answers here, but they aren't quite generalized enough.</a></p>