Skip to content

Commit

Permalink
Serial hashtable clear in reserve_for_additional invocation.
Browse files Browse the repository at this point in the history
  • Loading branch information
agudys committed May 22, 2019
1 parent 46ec11a commit b27bc87
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/hashmap_lp.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ class hash_map_lp {
Value val;
} item_t;

static const size_t INITIAL_SIZE = 16;
static const Key empty_key = static_cast<Key>(-1);


private:
double max_fill_factor;
Expand Down Expand Up @@ -119,7 +121,7 @@ class hash_map_lp {
ht_total = 0;
ht_match = 0;

allocated = 16;
allocated = INITIAL_SIZE;
allocated_mask = allocated - 1;
allocated_mask2 = allocated_mask >> 1;

Expand Down Expand Up @@ -323,7 +325,7 @@ class hash_map_lp {
data = new item_t[allocated];
// LOG_DEBUG << "reserve_for_additional - after new: " << allocated << std::endl;

parallel_clear();
clear();
// LOG_DEBUG << "reserve_for_additional - after clear: " << allocated << std::endl;

ht_memory += allocated * sizeof(item_t);
Expand Down
2 changes: 1 addition & 1 deletion src/version.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma once

#define VERSION "1.6.0"
#define VERSION "1.6.1"
#define DATE "22.05.2019"

0 comments on commit b27bc87

Please sign in to comment.