If you really want to optimize then more information are needed. If for example you have 100k objects and you know that 10% are only active then maybe you want to keep the active objects in a vector....