Timeline for Reducing memory usage of nested vectors
Current License: CC BY-SA 3.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 1, 2014 at 11:01 | comment | added | usr | Maybe map does some clever allocation strategy. If every tree node was a malloc-backed allocation there would be lots of overhead. Good to know. | |
Jan 1, 2014 at 4:55 | comment | added | microtherion |
Interesting thought. In my tests (clang on a Mac, latest C++ library), std::map<uint32_t,float> consistently uses less memory than std::unordered_map<uint32_t,float> (presumably because hash tables need a certain amount of free space to give decent performance). On the other hand, std::unordered_map was about twice as fast.
|
|
Jan 1, 2014 at 0:07 | comment | added | usr | A tree-based map likely has more memory usage than a hashtable based container. I'd use a hashtable if available. | |
Jun 5, 2013 at 23:51 | history | answered | microtherion | CC BY-SA 3.0 |