32a4456cc252689f51f383d150d34ed636bfec4d |
|
23-Oct-2014 |
Michal Schmidt <mschmidt@redhat.com> |
test: generate tests for OrderedHashmap from Hashmap tests
test-hashmap-ordered.c is generated from test-hashmap-plain.c simply by
substituting "ordered_hashmap" for "hashmap" etc.
In the cases where tests rely on the order of entries, a distinction
between plain and ordered hashmaps is made using the ORDERED macro,
which is defined only for test-hashmap-ordered.c. |
45fa9e29f8c9759c8f2f4238fed956f695c73dc3 |
|
01-Oct-2013 |
Lennart Poettering <lennart@poettering.net> |
hashmap: size hashmap bucket array dynamically
Instead of fixing the hashmap bucket array to 127 entries dynamically
size it, starting with a smaller one of 31. As soon as a fill level of
75% is reached, quadruple the size, and so on.
This should siginficantly optimize the lookup time in large tables
(from O(n) back to O(1)), and save memory on smaller tables (which most
are). |