modify hash_string* code to use CRC32
commit3e3bf50d564e229f6da2a7a3ed7bff7ba0f81701
authorBin Liu <binliu@fb.com>
Thu, 22 Jan 2015 18:38:29 +0000 (22 10:38 -0800)
committerJoelMarcey <joelm@fb.com>
Thu, 22 Jan 2015 23:58:57 +0000 (22 15:58 -0800)
tree06616ec5973336274248110de31f981f0dc9522b
parentd4b589108c77c392fb5f91e4c245618e1e69ef16
modify hash_string* code to use CRC32

Summary: When USE_SSECRC flag is defined (always for x86_64 unless NO_SSECRC is defined),
we try to use CRC32 hash functions.
A cpuid check is done, if SSE4.2 is not available, the fallback implementation uses MururHash.

If NO_SSECRC is defined, we won't have the overhead of cpuid checking and generates
more compact code.

Reviewed By: @markw65

Differential Revision: D1776398
16 files changed:
hphp/CMakeLists.txt
hphp/hhvm/main.cpp
hphp/hhvm/process-init.cpp
hphp/hhvm/process-init.h
hphp/runtime/base/program-functions.cpp
hphp/runtime/base/string-data.cpp
hphp/runtime/base/string-data.h
hphp/runtime/vm/jit/translator-asm-helpers.S
hphp/util/CMakeLists.txt
hphp/util/etch-helpers.h [moved from hphp/runtime/vm/jit/etch-helpers.h with 100% similarity]
hphp/util/functional.h
hphp/util/hash-crc.S [new file with mode: 0644]
hphp/util/hash.cpp
hphp/util/hash.h
hphp/util/memcpy-x64.S [moved from hphp/runtime/vm/jit/memcpy-x64.S with 98% similarity]
hphp/util/word-mem.h