authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2016-03-01 14:47:46-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2016-03-01 14:47:46-07:00
log660a50661b22b279fed548387d19ffcddb031b23
tree6fec568fa26d0343f39fcb1f576c3f6a4885456e
parent9c3d7b628c0b32d7276e4dc33e2e6f306af87472

better hash table performance


1 files changed, 2 insertions(+), 2 deletions(-)

src/hash_map.hpp+2-2
...@@ -46,8 +46,8 @@ public:...@@ -46,8 +46,8 @@ public:
46 _modification_count += 1;46 _modification_count += 1;
47 internal_put(key, value);47 internal_put(key, value);
4848
49 // if we get too full (80%), double the capacity49 // if we get too full (60%), double the capacity
50 if (_size * 5 >= _capacity * 4) {50 if (_size * 5 >= _capacity * 3) {
51 Entry *old_entries = _entries;51 Entry *old_entries = _entries;
52 int old_capacity = _capacity;52 int old_capacity = _capacity;
53 init_capacity(_capacity * 2);53 init_capacity(_capacity * 2);