cityhash



0
89

Introduction to CityHash https://hash.onlinetoolsland.com/cityhash/ The CityHash is a family of hash functions for strings, there are currently 2 type of CityHash CityHash64 and CityHash128. They can hash 64- and 128-bit hash codes, respectively. The cityhash is quite good for hash tables. but not the aren’t suitable for cryptography, The CityHash is invent and published by google. When the enginners at google tried to optimize for CPUs that are common in Google’s datacenters, they find out most PCs and laptops have the relevant features as well. The important ones are 64-bit registers, instruction-level parallelism, and fast unaligned memory accesses. Google thinks CityHash64 and CityHash128 are exciting new method to to solve a classic problem. Under real-life conditions they expect CityHash64 to outperform previous work by at least 30% in speed, and perhaps as much as a factor of two. Also, as far as we know, these functions’ statistical properties are sound. Please don’t hesitate to try this fast new code! Introduction to the CityHash The city hash is a a family of hash functions for strings.The cityhash is a hash functions for strings. ,but the cityhash are not suitable for cryptography. The CityHash32() returns a 32-bit hash. The CityHash64() and similar return a 64-bit hash. The CityHash128() and similar return a 128-bit hash and are used for strings of at least a few hundred bytes. The cityhash 128 almost always faster than CityHash64() on enough long strings. Depending on your compiler and hardware,and at the same time the cityhash 128 It's slower than necessary on shorter strings There are also CityHashCrc128() amd CityHashCrc256(),which return 128-bit hash. And 256-bit hash. All the hash function in the CityHash family are designed upon the work by Bob Jenkins Austin Appleby and others.such as Murmur3a The per Performance of CityHash famlily The Performance of CityHash64 and its many variants on both short and long are both interesting The cityhash is designed to be a fast algorithm ,under certain conditions , it runs quite fast On a sole core of a 2.67GHz Intel Xeon X5550, the CityHashCrc256 can run at max of 5 to 5.5 bytes/cycle. The other CityHashCrc hashes are wrappers around CityHashCrc256 and have similar performance on long strings. The CityHash128 peaks at about 4.3 bytes/cycle. Compare with other hashes There are some hash just like the cityhash , include SpookyHash by Bob Jenkins And Murmur hash. The performance on long strings For operate on long strings, pookyHash, is just A little slower than CityHash128 on Intel x86-64 CPUs, but more faster on AMD x86-64 CPUs. For operating on hashing long strings on AMD CPUs and/or CPUs without the CRC instruction, SpookyHash may be just as good or better than any of the CityHash variants. The performance on on short strings: 64-bit CPUs for operating on short strings, CityHash64 is faster than CityHash128, and probably faster than all the aforementioned functions, depending on the mix of string lengths. Hash Results CityHash64 v1.0.3 7ns for 1 byte, or 6ns for 8 bytes, or 9ns for 64 bytes Murmur2 (64-bit) 6ns for 1 byte, or 6ns for 8 bytes, or 15ns for 64 bytes Murmur3F 14ns for 1 byte, or 15ns for 8 bytes, or 23ns for 64 bytes The performance on 32-bit CPUs The CityHash32 is the newest variant of CityHash. It is designed for 32-bit hardware in general but has been mostly tested on x86. We don't know of anything faster that has comparable quality. The speed rankings in our testing: CityHash32 Murmur3f Murmur3a (for long strings), and CityHash32 Murmur3a Murmur3f (for short strings). https://hash.onlinetoolsland.com/cityhash/

Published by: video video Published at: 5 years ago Category: علمی و تکنولوژی