don't store key in fixed dict

This commit is contained in:
jacob 2025-05-21 13:59:43 -05:00
parent 3a8a66850d
commit 6d561010cf

View File

@ -106,7 +106,6 @@ INLINE void merge_sort(void *items, u64 item_count, u64 item_size, sort_compare_
* ========================== */ * ========================== */
struct fixed_dict_entry { struct fixed_dict_entry {
struct string key;
void *value; void *value;
u64 hash; u64 hash;
struct fixed_dict_entry *next; struct fixed_dict_entry *next;
@ -144,7 +143,6 @@ INLINE void fixed_dict_set(struct arena *arena, struct fixed_dict *dict, struct
while (entry) { while (entry) {
if (hash == entry->hash) { if (hash == entry->hash) {
/* Existing match found, replace its contents */ /* Existing match found, replace its contents */
entry->key = key;
entry->value = value; entry->value = value;
return; return;
} }
@ -153,7 +151,6 @@ INLINE void fixed_dict_set(struct arena *arena, struct fixed_dict *dict, struct
/* No match found, create new entry */ /* No match found, create new entry */
entry = arena_push(arena, struct fixed_dict_entry); entry = arena_push(arena, struct fixed_dict_entry);
entry->key = key;
entry->value = value; entry->value = value;
entry->hash = hash; entry->hash = hash;
entry->next = bin->entry_head; entry->next = bin->entry_head;