From ec64e1d7bd230a172abfc37724d16af92d5fd37d Mon Sep 17 00:00:00 2001 From: Roberto Raggi Date: Thu, 2 Sep 2010 16:44:58 +0200 Subject: Tune the symbol and the literal tables. --- src/shared/cplusplus/Scope.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/shared/cplusplus/Scope.cpp') diff --git a/src/shared/cplusplus/Scope.cpp b/src/shared/cplusplus/Scope.cpp index bc5eeb90bb..b500f178cb 100644 --- a/src/shared/cplusplus/Scope.cpp +++ b/src/shared/cplusplus/Scope.cpp @@ -105,7 +105,7 @@ private: void rehash(); private: - enum { DefaultInitialSize = 11 }; + enum { DefaultInitialSize = 4 }; Scope *_owner; Symbol **_symbols; @@ -147,7 +147,7 @@ void SymbolTable::enterSymbol(Symbol *symbol) symbol->_scope = _owner; _symbols[_symbolCount] = symbol; - if (_symbolCount >= _hashSize * 0.6) + if (_symbolCount * 5 >= _hashSize * 3) rehash(); else { const unsigned h = hashValue(symbol); -- cgit v1.2.1