]> git.feebdaed.xyz Git - linuxyz.git/commitdiff
cmap hash
authorseantywork <seantywork@gmail.com>
Thu, 21 Aug 2025 03:23:01 +0000 (12:23 +0900)
committerseantywork <seantywork@gmail.com>
Thu, 21 Aug 2025 03:23:01 +0000 (12:23 +0900)
hashmap-concurrent-perf/2508-03.xyz.md [deleted file]
hashmap-concurrent-perf/Makefile
hashmap-concurrent-perf/cmap.c
hashmap-concurrent-perf/cmap.h

diff --git a/hashmap-concurrent-perf/2508-03.xyz.md b/hashmap-concurrent-perf/2508-03.xyz.md
deleted file mode 100644 (file)
index 792d600..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#
index 0833ac0be8a2499aaceb66c2bb0a89fca8983388..d322d7a8611e5341bec42f1d5a0f7298bba20bc1 100644 (file)
@@ -1,4 +1,4 @@
-all:
+sha:
 
        gcc -g -O2 -o cmap.out cmap.c -lpthread -lcrypto -lssl
 
index 6c4cd24095f99ac8748aee838520601a398b4aed..41841956eef1a12ce66283260862dc4ec4b81957 100644 (file)
@@ -5,10 +5,7 @@
 #define BUCK_SIZE 1024 
 #define DATA_SIZE 512
 
-#ifdef HASHCUSTOM
-static inline uint64_t _hashfunc(uint8_t* data, size_t size){}
 
-#else
 #define HASHLEN 32
 #define HASHTRUNCLEN 8
 static inline uint64_t _hashfunc(uint8_t* data, size_t size, uint64_t div){
@@ -26,7 +23,7 @@ static inline uint64_t _hashfunc(uint8_t* data, size_t size, uint64_t div){
        
        return hashtrunc % div;
 }
-#endif
+
 
 BOGUS_CMAP* cmap_alloc(int buck_size, int data_size){
 
index 92c00954026812b8f41eaee40fc5bb4e2ef606c9..7b8293a5b27e4a0ab26d5aa03d6c404356f09cbe 100644 (file)
@@ -39,6 +39,8 @@ typedef struct BOGUS_CMAP{
     int buck_size;
 } BOGUS_CMAP;
 
+
+
 BOGUS_CMAP* cmap_alloc(int buck_size, int data_size);
 int cmap_set(BOGUS_CMAP* cm, BOGUS_DATA* val);
 int cmap_get(BOGUS_CMAP* cm, BOGUS_DATA* key, void* ret, void (*cb)(void* ret, void* data));