summaryrefslogtreecommitdiff
path: root/src/hashmap.h
AgeCommit message (Collapse)Author
2023-05-18util: Create hashmap data structure with FNV-1a 32-bit hashingHEADmasterJohnny Richard
This path implements a hashmap data structure using the FNV-1a hashing function of 32 bits. However, there are a few limitations to consider: a) The table does not automatically expand when it becomes too large. b) The capacity of the hashmap must be a power of 2 to optimize performance, as we utilize bitwise shifting instead of modulus calculations. c) Currently, there are no functions available to destroy hashmap entries. Collisions are handled using a linked list, which is not the most optimal solution in terms of performance. However, it serves our current needs adequately. Signed-off-by: Johnny Richard <johnny@johnnyrichard.com>