diff options
| author | Tyge Løvset <[email protected]> | 2021-06-16 23:23:07 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-06-16 23:23:07 +0200 |
| commit | de216de5b32da73ce835d2a3d03b4dd44bfeaf6d (patch) | |
| tree | 6c374285bb7fa8934bf8cb5e945dc7b342b2293e /include/stc/cmap.h | |
| parent | e8938b55964df7b1f051263796ddafa7ae94ee77 (diff) | |
| download | STC-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.h | 2 |
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) { \
|
