summaryrefslogtreecommitdiffhomepage
path: root/include/stc/cmap.h
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2021-06-16 23:23:07 +0200
committerTyge Løvset <[email protected]>2021-06-16 23:23:07 +0200
commitde216de5b32da73ce835d2a3d03b4dd44bfeaf6d (patch)
tree6c374285bb7fa8934bf8cb5e945dc7b342b2293e /include/stc/cmap.h
parente8938b55964df7b1f051263796ddafa7ae94ee77 (diff)
downloadSTC-modified-de216de5b32da73ce835d2a3d03b4dd44bfeaf6d.tar.gz
STC-modified-de216de5b32da73ce835d2a3d03b4dd44bfeaf6d.zip
A fix in cstr_icontains() and some minor improvements
Diffstat (limited to 'include/stc/cmap.h')
-rw-r--r--include/stc/cmap.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/stc/cmap.h b/include/stc/cmap.h
index e66bd526..737e0dab 100644
--- a/include/stc/cmap.h
+++ b/include/stc/cmap.h
@@ -383,7 +383,7 @@ STC_INLINE size_t fastrange_uint64_t(uint64_t x, uint64_t n) \
STC_DEF CX##_result_t \
CX##_insert_entry_(CX* self, RawKey rkey) { \
if (self->size + 1 >= (CX##_size_t) (self->bucket_count * self->max_load_factor)) \
- CX##_reserve(self, 8 + self->size * 3 / 2); \
+ CX##_reserve(self, 8 + (self->size*13ull >> 3)); \
chash_bucket_t b = CX##_bucket_(self, &rkey); \
CX##_result_t res = {&self->table[b.idx], !self->_hashx[b.idx]}; \
if (res.inserted) { \