hashmap: add OrderedHashmap as a distinct type

System Internals / systemd - Michal Schmidt [redhat.com] - 23 October 2014 10:38 UTC

Few Hashmaps/Sets need to remember the insertion order. Most don't care about the order when iterating. It would be possible to use more compact hashmap storage in the latter cases.

Add OrderedHashmap as a distinct type from Hashmap, with functions prefixed with "ordered_". For now, the functions are nothing more than inline wrappers for plain Hashmap functions.

5ba4371 hashmap: add OrderedHashmap as a distinct type
src/shared/hashmap.h | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 116 insertions(+)

Upstream: github.com


  • Share