How to quickly create a hash of fully identifying the array?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
11 views
Use floating in the air option

jmd5 function($input) { return md5(json_encode($input)); }


Something tells me that there are more low-level solution. Often used in kilometer-long cycles and noticeably.
by | 11 views

2 Answers

0 like 0 dislike
Can take to try xxHash?
Name Speed Quality Author xxHash 5.4 GB/s 10 Y. C. MurmurHash 3a 2.7 GB/s 10 Austin Appleby SBox 1.4 GB/s 9 Bret Mulvey Lookup3 1.2 GB/s 9 Bob Jenkins CityHash64 1.05 GB/s 10 Pike & Alakuijala FNV 0.55 GB/s 5 Fowler, Noll, Vo CRC32 0.43 GB/s 9 MD5-32 0.33 GB/s 10 Ronald L. Rivest SHA1-32 0.28 GB/s 10
by
0 like 0 dislike
Fully identifying - no, because in any hashing may arise of a conflict.

Of course, there are faster algorithms than md5, but the shorter the hash, the greater the likelihood of collisions.
(comparative tests 1, 2, 3)

Hint: serialize is faster than json_encode?
by

Related questions

0 like 0 dislike
2 answers
0 like 0 dislike
4 answers
110,608 questions
257,186 answers
0 comments
35,573 users