We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Bingo, i did this as well but with unordered map. It requires more memory but makes lookup O(1) (sans hash collisions).
I also ran into 'the regex problem' i.e. people suggesting i do this despite knowing basically no regex.
Anyway, i just did a hash map of hashmaps so you get text["address"]["query"] and it was about 10 fairly verbose lines to parse the line and shove it in the hashmaps, could be refactored.
Attribute Parser
You are viewing a single comment's thread. Return to all comments →
Bingo, i did this as well but with unordered map. It requires more memory but makes lookup O(1) (sans hash collisions).
I also ran into 'the regex problem' i.e. people suggesting i do this despite knowing basically no regex.
Anyway, i just did a hash map of hashmaps so you get text["address"]["query"] and it was about 10 fairly verbose lines to parse the line and shove it in the hashmaps, could be refactored.
If space is really a premium a tree would help.