vppinfra: don't use memcmp to compare keys in cuckoo
Type: improvement Change-Id: I7e11bf72be5fad5967724c038eb649a261294ca0 Signed-off-by: Damjan Marion <damarion@cisco.com>
This commit is contained in:

committed by
Florin Coras

parent
88bcba80d5
commit
8daeea9a5d
@ -31,11 +31,9 @@
|
||||
#include <vppinfra/cuckoo_common.h>
|
||||
|
||||
#undef CLIB_CUCKOO_OPTIMIZE_PREFETCH
|
||||
#undef CLIB_CUCKOO_OPTIMIZE_CMP_REDUCED_HASH
|
||||
#undef CLIB_CUCKOO_OPTIMIZE_UNROLL
|
||||
#undef CLIB_CUCKOO_OPTIMIZE_USE_COUNT_LIMITS_SEARCH
|
||||
#define CLIB_CUCKOO_OPTIMIZE_PREFETCH 1
|
||||
#define CLIB_CUCKOO_OPTIMIZE_CMP_REDUCED_HASH 1
|
||||
#define CLIB_CUCKOO_OPTIMIZE_UNROLL 1
|
||||
#define CLIB_CUCKOO_OPTIMIZE_USE_COUNT_LIMITS_SEARCH 1
|
||||
|
||||
|
@ -31,11 +31,9 @@
|
||||
#include <vppinfra/cuckoo_common.h>
|
||||
|
||||
#undef CLIB_CUCKOO_OPTIMIZE_PREFETCH
|
||||
#undef CLIB_CUCKOO_OPTIMIZE_CMP_REDUCED_HASH
|
||||
#undef CLIB_CUCKOO_OPTIMIZE_UNROLL
|
||||
#undef CLIB_CUCKOO_OPTIMIZE_USE_COUNT_LIMITS_SEARCH
|
||||
#define CLIB_CUCKOO_OPTIMIZE_PREFETCH 1
|
||||
#define CLIB_CUCKOO_OPTIMIZE_CMP_REDUCED_HASH 1
|
||||
#define CLIB_CUCKOO_OPTIMIZE_UNROLL 1
|
||||
#define CLIB_CUCKOO_OPTIMIZE_USE_COUNT_LIMITS_SEARCH 1
|
||||
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include <vppinfra/types.h>
|
||||
|
||||
#define CLIB_CUCKOO_OPTIMIZE_PREFETCH 1
|
||||
#define CLIB_CUCKOO_OPTIMIZE_CMP_REDUCED_HASH 1
|
||||
#define CLIB_CUCKOO_OPTIMIZE_UNROLL 1
|
||||
#define CLIB_CUCKOO_OPTIMIZE_USE_COUNT_LIMITS_SEARCH 1
|
||||
|
||||
|
@ -383,11 +383,7 @@ always_inline int CV (clib_cuckoo_bucket_search) (CVT (clib_cuckoo_bucket) *
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
if (
|
||||
#if CLIB_CUCKOO_OPTIMIZE_CMP_REDUCED_HASH
|
||||
reduced_hash == b->reduced_hashes[i] &&
|
||||
#endif
|
||||
0 == memcmp (&kvp->key, &b->elts[i].key, sizeof (kvp->key)))
|
||||
if (CV (clib_cuckoo_key_compare) (kvp->key, b->elts[i].key))
|
||||
{
|
||||
kvp->value = b->elts[i].value;
|
||||
clib_cuckoo_bucket_aux_t bucket_aux2 = b->aux;
|
||||
|
Reference in New Issue
Block a user