Skip to content

Consider a different hash algorithm for the various hash maps+sets #1657

Open
@Rangi42

Description

See https://github.com/taviso/swisstable

std::unordered_map<std::string, T>:

src/asm/charmap.cpp:37:static std::unordered_map<std::string, size_t> charmapMap; // Indexes into `charmapList`
src/asm/lexer.cpp:140:static std::unordered_map<std::string, int, CaseInsensitive, CaseInsensitive> keywordDict = {
src/asm/main.cpp:136:   std::unordered_map<std::string, std::vector<StateFeature>> stateFileSpecs;
src/asm/section.cpp:44:std::unordered_map<std::string, size_t> sectionMap; // Indexes into `sectionList`
src/asm/symbol.cpp:22:std::unordered_map<std::string, Symbol> symbols;
src/link/section.cpp:14:std::unordered_map<std::string, size_t> sectionMap; // Indexes into `sectionList`
src/link/symbol.cpp:15:std::unordered_map<std::string, Symbol *> symbols;
src/link/symbol.cpp:16:std::unordered_map<std::string, std::vector<Symbol *>> localSymbols;

Other std::(unordered_)?(map|set):

src/asm/charmap.cpp:48:         std::map<size_t, std::string> mappings;
src/asm/symbol.cpp:23:std::unordered_set<std::string> purgedSymbols;
src/gfx/pal_packing.cpp:156:        std::unordered_set<uint16_t> &colors,
src/gfx/pal_packing.cpp:167:    std::unordered_set<uint16_t> &uniqueColors() const {
src/gfx/pal_packing.cpp:180:            static std::unordered_set<uint16_t> colors;
src/gfx/pal_packing.cpp:303:            std::unordered_set<uint16_t> colors;
src/gfx/process.cpp:904:        std::unordered_set<TileData> tileset;
src/gfx/process.cpp:1118:               std::unordered_set<uint16_t> tileColors;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    optimizationThis increases performance or decreases size

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions