Currently, each string stored in the hashtable is allocated on the regular heap with its own malloc, which suffers from additional memory overhead (bookkeeping data + padding). This overhead can increase the heap size by 50-100 %.
Writing own heap for strings could make this a little bit more memory-efficient and maybe a little faster.
Currently, each string stored in the hashtable is allocated on the regular heap with its own malloc, which suffers from additional memory overhead (bookkeeping data + padding). This overhead can increase the heap size by 50-100 %. Writing own heap for strings could make this a little bit more memory-efficient and maybe a little faster.