From Craig Silverstein: size hash tables to avoid resizing.

This commit is contained in:
Ian Lance Taylor
2007-12-14 05:24:17 +00:00
parent 460c00b558
commit 6d01333390
7 changed files with 81 additions and 11 deletions

View File

@@ -295,10 +295,11 @@ Symbol::final_value_is_known() const
// Class Symbol_table.
Symbol_table::Symbol_table()
: saw_undefined_(0), offset_(0), table_(), namepool_(),
Symbol_table::Symbol_table(unsigned int count)
: saw_undefined_(0), offset_(0), table_(count), namepool_(),
forwarders_(), commons_(), warnings_()
{
namepool_.reserve(count);
}
Symbol_table::~Symbol_table()