stb icon indicating copy to clipboard operation
stb copied to clipboard

support memory context for arrays

Open hugoArregui opened this issue 11 months ago • 3 comments

hugoArregui avatar Mar 15 '24 17:03 hugoArregui

hash table had a context pointer because the hash table already has a lot of size overhead. however, the array size overhead is a lot smaller, so adding a context pointer to it adds a significant amount.

nothings avatar Mar 15 '24 17:03 nothings

@nothings would this makes sense if I add a #ifdef STBDS_ARRAY_CUSTOM_CONTEXT and only include the pointer in the structure then? If you have another idea I can try it as well (I though this may be useful for you as well because of the TODO comment in the file)

hugoArregui avatar Mar 15 '24 18:03 hugoArregui

Oh, I forgot about the todo. I guess it's ok then.

nothings avatar Mar 15 '24 22:03 nothings