Best data structure for a particle system?
Mikko Ronkainen
mikoro at iki.fi
Fri Nov 15 05:32:36 PST 2013
Ok, thanks! That linked list cache thrashing was just the thing I
knew that I don't know :)
Let's say I just use dynamic array and grow it when adding new
particles to the system, and when particles die, just set their
dead flag on. This means that, when adding a new particle, I need
to scan the array first for possible dead particles that can be
reused. Is there some trick that could be used here to reduce
excessive searching/iteration?
More information about the Digitalmars-d-learn
mailing list