U
umetnik
Guest
I was surprised by the high memory usage of ds_map_create(). Each empty map takes about 32kB of memory. Compared to 28 bytes for ds_list_create(). That is a more than 1000 times less. Is this normal? I checked both with and without YYC, on Windows and Android.
I wanted to have a ds_list of entries with a ds_map for each entry holding a set of its different "properties". If I would use instances of an object with these properties set, it would "only" take around 1kB for each instance (32 times better), but creating instances is a slow process and would most likely affect FPS...
Maybe I should think of a way to have one ds_map, shared by all entries in the list. Or I should learn how to use buffers and use those instead. Maps did seem more convenient for my use case though. Does anyone know of a better approach?
I wanted to have a ds_list of entries with a ds_map for each entry holding a set of its different "properties". If I would use instances of an object with these properties set, it would "only" take around 1kB for each instance (32 times better), but creating instances is a slow process and would most likely affect FPS...
Maybe I should think of a way to have one ds_map, shared by all entries in the list. Or I should learn how to use buffers and use those instead. Maps did seem more convenient for my use case though. Does anyone know of a better approach?