summaryrefslogtreecommitdiffstats
path: root/lib/xxhash.h
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2015-03-25 17:06:40 (GMT)
committerYann Collet <yann.collet.73@gmail.com>2015-03-25 17:06:40 (GMT)
commita357f434f06de70e5d670b8669becccb09f4c7a6 (patch)
tree0788b37b46dc45c6744e1ad1f4435a77140012b4 /lib/xxhash.h
parent4a9335bd605421218e3cc87dc77c4634051469eb (diff)
downloadlz4-a357f434f06de70e5d670b8669becccb09f4c7a6.zip
lz4-a357f434f06de70e5d670b8669becccb09f4c7a6.tar.gz
lz4-a357f434f06de70e5d670b8669becccb09f4c7a6.tar.bz2
Fixed cast-align warnings on 32-bits
Diffstat (limited to 'lib/xxhash.h')
-rw-r--r--lib/xxhash.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/xxhash.h b/lib/xxhash.h
index 99b0c27..34eea73 100644
--- a/lib/xxhash.h
+++ b/lib/xxhash.h
@@ -56,6 +56,12 @@ SHA1-32 0.28 GB/s 10
Q.Score is a measure of quality of the hash function.
It depends on successfully passing SMHasher test set.
10 is a perfect score.
+
+A new 64-bits version, named XXH64, is available since r35.
+It offers better speed for 64-bits applications.
+Name Speed on 64 bits Speed on 32 bits
+XXH64 13.8 GB/s 1.9 GB/s
+XXH32 6.8 GB/s 6.0 GB/s
*/
#pragma once
@@ -66,20 +72,15 @@ extern "C" {
/*****************************
- Includes
+* Definitions
*****************************/
#include <stddef.h> /* size_t */
-
-
-/*****************************
- Type
-*****************************/
typedef enum { XXH_OK=0, XXH_ERROR } XXH_errorcode;
/*****************************
- Simple Hash Functions
+* Simple Hash Functions
*****************************/
unsigned int XXH32 (const void* input, size_t length, unsigned seed);
@@ -94,12 +95,13 @@ XXH32() :
Speed on Core 2 Duo @ 3 GHz (single thread, SMHasher benchmark) : 5.4 GB/s
XXH64() :
Calculate the 64-bits hash of sequence of length "len" stored at memory address "input".
+ Faster on 64-bits systems. Slower on 32-bits systems.
*/
/*****************************
- Advanced Hash Functions
+* Advanced Hash Functions
*****************************/
typedef struct { long long ll[ 6]; } XXH32_state_t;
typedef struct { long long ll[11]; } XXH64_state_t;