From 660a50661b22b279fed548387d19ffcddb031b23 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 1 Mar 2016 14:47:46 -0700 Subject: better hash table performance --- src/hash_map.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/hash_map.hpp b/src/hash_map.hpp index 7f2d39ef86..9c9939e4cc 100644 --- a/src/hash_map.hpp +++ b/src/hash_map.hpp @@ -46,8 +46,8 @@ public: _modification_count += 1; internal_put(key, value); - // if we get too full (80%), double the capacity - if (_size * 5 >= _capacity * 4) { + // if we get too full (60%), double the capacity + if (_size * 5 >= _capacity * 3) { Entry *old_entries = _entries; int old_capacity = _capacity; init_capacity(_capacity * 2); -- cgit v1.2.3