diff options
author | Johnny Richard <johnny@johnnyrichard.com> | 2023-05-17 18:06:12 +0200 |
---|---|---|
committer | Carlos Maniero <carlos@maniero.me> | 2023-05-18 19:08:02 -0300 |
commit | 89fe36162221ab36c5f2dfec1446dc406c68272b (patch) | |
tree | 89849408328a6026af1a140109b73b23b6c65027 /src/string_view.h | |
parent | 15196aa56339d34af9f74b019e6aeff5816e8dcc (diff) |
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>
Diffstat (limited to 'src/string_view.h')
0 files changed, 0 insertions, 0 deletions