{"repo":"DavidLeeds/hashmap","free":true,"listed":false,"github":"https://github.com/DavidLeeds/hashmap","clone":"git clone https://github.com/DavidLeeds/hashmap.git","description":"Templated type-safe hashmap implementation in C using open addressing and linear probing for collision resolution.","language":"C","stars":281,"topics":["hashmap","constant-time","linear-probing","open-addressing","c","embedded-linux","tiny-library","generic-programming","template","type-safe"],"license":"MIT","category":"saas-starters-boilerplates","readme_excerpt":"hashmap Templated type-safe hashmap implementation in C using open addressing and linear probing for collision resolution. Summary This project came into existence because there are a notable lack of flexible and easy to use data structures available in C. C data structures with efficient, type-safe interfaces are virtually non-existent. Higher level languages have built-in libraries and templated classes, but plenty of embedded projects or higher level libraries are implemented in C. When it is undesireable to depend on a bulky library like Glib or grapple with a restrictive license agreement, this is the library for you. Goals To scale gracefully to the full capacity of the numeric primitives in use. We should be able to load enough entries to consume all memory on the system without hitting any bugs relating to integer overflows. Lookups on a hashtable with a hundreds of millions of entries should be performed in close to constant time, no different than lookups in a hashtable with 20 entries. Automatic rehashing occurs and maintains a load factor of 0.75 or less. To provide a clean and easy-to-use interface. C data structures often struggle to strike a balance between flexibility and ease of use. To this end, I wrapped a generic C backend implementation with light-weight pre-processor macros to create a templated interface that enables the compiler to type-check all function arguments and return values. All required type information is encoded in the hashmap declaration u","default_branch":null,"files":null,"tree":[],"storefront":"/r/DavidLeeds","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/DavidLeeds/hashmap/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}