3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-28 14:08:58 +00:00

Merge pull request #5248 from calewis/try_unordereded_map

Use unordered_map instead of dict for IdString's char* to index storage.
This commit is contained in:
Emil J 2025-07-29 18:40:07 +02:00 committed by GitHub
commit 41295175dc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View file

@ -23,6 +23,9 @@
#include "kernel/yosys_common.h"
#include "kernel/yosys.h"
#include <string_view>
#include <unordered_map>
YOSYS_NAMESPACE_BEGIN
namespace RTLIL
@ -122,7 +125,7 @@ struct RTLIL::IdString
} destruct_guard;
static std::vector<char*> global_id_storage_;
static dict<char*, int> global_id_index_;
static std::unordered_map<std::string_view, int> global_id_index_;
#ifndef YOSYS_NO_IDS_REFCNT
static std::vector<int> global_refcount_storage_;
static std::vector<int> global_free_idx_list_;