20 Feb
2015
20 Feb
'15
2:01 p.m.
Olaf van der Spek
Hi,
What's the memory consumption of ordered indices? Is it implemented as a linked list, so two pointers per element?
The overhead (on most platforms) is three pointers per node (and index): http://stackoverflow.com/a/4208349/213114 Color is usually embedded into one of the pointers: http://bannalia.blogspot.com/2008/11/optimizing-red-black-tree-color-bits.ht...
In that case for a write-only data structure an external ptr vector would make more sense wouldn't it?
What's a "write-only" structure supposed to be useful for? Anyway, s sorted vector is definitely better in terms of memory consumption than a single-index multi_index_container. Joaquin M López Muñoz Telefónica