Skip to content

Commit

Permalink
Make global_vars hashtable bigger
Browse files Browse the repository at this point in the history
Doubled `global_vars` size of `global_vars` hashtable
  • Loading branch information
mkornaukhov03 authored Nov 28, 2023
1 parent 0aa74f8 commit d685b6c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion compiler/compiler-core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ VarPtr CompilerCore::create_var(const std::string &name, VarData::Type type) {

VarPtr CompilerCore::get_global_var(const std::string &name, VarData::Type type,
VertexPtr init_val, bool *is_new_inserted) {
TSHashTable<VarPtr>::HTNode *node = global_vars_ht.at(vk::std_hash(name));
auto *node = global_vars_ht.at(vk::std_hash(name));
VarPtr new_var;
if (!node->data) {
AutoLocker<Lockable *> locker(node);
Expand Down
2 changes: 1 addition & 1 deletion compiler/compiler-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class CompilerCore {
TSHashTable<FunctionPtr> functions_ht;
TSHashTable<ClassPtr> classes_ht;
TSHashTable<DefinePtr> defines_ht;
TSHashTable<VarPtr> global_vars_ht;
TSHashTable<VarPtr,2'000'000> global_vars_ht;
TSHashTable<LibPtr, 1000> libs_ht;
TSHashTable<ModulitePtr, 1000> modulites_ht;
TSHashTable<ComposerJsonPtr, 1000> composer_json_ht;
Expand Down

0 comments on commit d685b6c

Please sign in to comment.