Recent

Author Topic: How to get hash of entire TStringList?  (Read 1192 times)

Warfley

  • Hero Member
  • *****
  • Posts: 1852
Re: How to get hash of entire TStringList?
« Reply #15 on: December 08, 2024, 01:30:18 pm »
Compared to normal hashing algorithms, Fletcher does not seem to spread the result. Simple hash scrambles the bits around with the shift and the java hash basically does 4 shifts with that multiplication. While Fletcher just does additions. So if all values are in a similar range (as is typical in ASCII text) meaning small differences in the text will give only small differences in the result.

While this may not result in more collisions (but not really sure about that), it may result in less uniform usage in a hashmap.

 

TinyPortal © 2005-2018