From 4954816d61cfa94a6730d2b4bcbf1f5d236c2724 Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Sat, 7 Dec 2013 13:50:50 -0500 Subject: [PATCH] ck_ht: Predict empty slot to be likely on grow. --- src/ck_ht.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ck_ht.c b/src/ck_ht.c index f748fee..0440e31 100644 --- a/src/ck_ht.c +++ b/src/ck_ht.c @@ -515,7 +515,7 @@ restart: struct ck_ht_entry *cursor = bucket + ((j + offset) & (CK_HT_BUCKET_LENGTH - 1)); probes++; - if (cursor->key == CK_HT_KEY_EMPTY) { + if (CK_CC_LIKELY(cursor->key == CK_HT_KEY_EMPTY)) { *cursor = *previous; update->n_entries++;