What will be faster? Compare 128 elements byte-by-byte or their one-time generated hash (for example, hash int 6-12 elements or the length of a number in width :))? also with 6 array elements a similar question.

Expect an explanation and some fast hash generation algorithm (in the case of their speed).

  • There are possible collisions with the hash (two different elements can have the same hash), does this allow for the problem? - Vladimir Gamalyan
  • It depends on how many bytes are in cache and in bytes - Sergey
  • Do you want to find the same data sets? or do you solve any other problem? - Mikhail Vaysman
  • I want to compare two arrays of X lengths. Hash byte? (6-12). Yes, I heard that collisions are possible (such an option is also possible) - Denis Kotlyarov

0