4 ms·
I find it highly suspect when a data structure uses independently allocated nodes tha contain actual pointers (as opposed to indirection ints). I know people li
by webkike 10y ago
I find it highly suspect when a data structure uses independently allocated nodes tha contain actual pointers (as opposed to indirection ints). I know people like to make the tree just be another node, but it's really really important to allocate things together! I would deem it mandatory to allocate every node in the same tree in the same vector.
- hcs 10y agoAre you criticizing the separation of m_sparseIds and m_items in this article? Could you give some more detail as to why you see this as a problem? The only performance issue I see with having these separate is what the author describes as Consideration #2: you have to do completely separate read for the indirection which may incur an additional cache miss. But this is the cost of keeping the dense set dense and the handles constant. Is there another issue I'm overlooking? Maybe I misunderstand you, as this structure does use int indexes (both for the free lists and to locate objects in the other array), and I don't know what you mean by "I know people like to make the tree just be another node"