From 64229e6ca53b7af103cec326ffca6f718da65732 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Wed, 6 Mar 2024 16:46:33 -0500 Subject: [PATCH] Updates to zpl hash map description --- code/grime_hashmap_zpl.odin | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/code/grime_hashmap_zpl.odin b/code/grime_hashmap_zpl.odin index 8099c50..9ee7510 100644 --- a/code/grime_hashmap_zpl.odin +++ b/code/grime_hashmap_zpl.odin @@ -1,16 +1,20 @@ -// This is an alternative to Odin's default map type. -// The only reason I may need this is due to issues with allocator callbacks or something else going on -// with hot-reloads... +/* +This is an alternative to Odin's default map type. +The only reason I may need this is due to issues with allocator callbacks or something else going on +with hot-reloads... -// This implementation uses two ZPL-Based Arrays to hold entires and the actual hash table. -// Its algorithim isn't that great, removal of elements is very expensive. -// Growing the hashtable doesn't do a resize on the original arrays properly, leading to completely discarded memory. -// Its recommended to use something closer to raddbg's implementation for greater flexibility. +This implementation uses two ZPL-Based Arrays to hold entires and the actual hash table. +Its algorithim isn't that great, removal of elements is very expensive. +Growing the hashtable doesn't do a resize on the original arrays properly, leading to completely discarded memory. +Its recommended to use something closer to raddbg's implementation for greater flexibility. + +This should only be used if you want the hashtable to also store the values +and an open-addressing hashtable is for some reason not desired. +*/ package sectr import "core:slice" - // Note(Ed) : See core:hash for hasing procs. // This might be problematic...